A Type System to Rule Them All - Kronark

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 79

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

    I can't wait to show you people my progress on the executable front soon! One more explainer video like this and then we'll be back on track.

    • @darkfllame
      @darkfllame Месяц назад +4

      @@Kronark yeah, i'd kinda like to know you tackled the problem of type casting. Also custom types could be very interesting (structs, unions, enums - nvm you have options that's right - or potentially bitmasks), also differenciating between stack and register values could be very interesting too: full control over how your program behave..

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

      All in due time :D already thought about everything you just mentioned :P

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

      You mean we will be able to use it after a week?
      I'm new to programming
      I feel like visual programming is more natural than text
      Everytime i read the code
      I have to imagine the flow
      It's frustrating

    • @darkfllame
      @darkfllame Месяц назад +1

      ​@@gvbjgg1061he already explained that we peobably won't have a public release after a year or two

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

      ​@@darkfllamehow is he making it in the first place
      I means what are the tools and technologies he is using

  • @jasonyesmarc309
    @jasonyesmarc309 Месяц назад +28

    Placing bets to see if the episode counter will be using hexadecimal.

    • @amalirfan
      @amalirfan Месяц назад +3

      Octal maybe?

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

      Nah, octal is giving pick-me vibes

    • @redyau_
      @redyau_ Месяц назад +3

      I doubt he wants to make 65k episodes :P
      1k is more than enough of an undertaking

    • @darkfllame
      @darkfllame Месяц назад +1

      ​​@@Kronarki find octal hard to read ngl, i find hex or dec way more intuitive

  • @ads1035
    @ads1035 Месяц назад +2

    I could see these ideas revolutionizing how we write software and interact with our computers.

  • @darkfllame
    @darkfllame Месяц назад +20

    ngl i jumped on the notification

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

      I expected nothing less from you

  • @mihailazar2487
    @mihailazar2487 Месяц назад +1

    The amount of hype I have for this series is unquantifiable compared to any TV show I've ever watched. Not Breaking bad, not The Expanse (good show btw), not even mr Robot got me so excited to see what's going on next.
    I think it's because this is actually REAL. We are at the forefront of the exploration into a completely new way of using the computer. What we se here is certaintly not new, (ask any blender user how addicted they are to the node editor in there XD) but it feels like FINALLY, after decades of very powerful, but scope-limited editors, and very broad and extremely shitty node editors¹, this one really feels like it might just be The Lisan-Al-Gaib.

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

      All those sleepless nights when we wished we could just do this stupid effects stack in photoshop/gimp much easier if only we were provided with something akin to blender's node editor
      All those times when we kept piping stuff into regexes and awk and editing a gigantic string of ancient bash runes in order to finally be able to rename a bunch of files in just the right way
      All of those times when we tried to take advantage of ffmpeg's O(1) rendering time for trimming, concatenating and muxing video with audio, only to be lost in the mess that is it's syntax, sighing, then wishing there was a way to visualize that pipeline better². to take a few of those nodes and create a custom one that encapsulates them for easy re-use. Then just snapping out of our daydream and re-doing the same thing in a normal video editing software, and waiting an eternity for it to render, fully knowing that if you could've just used ffmpeg, the render time would have been within the same order of magnitude as the video itself
      ¹ | (daily reminder labview exists, and they keep updating it instead of apologizing for ever creating it)
      Oh and don't even get me started on the morons trying to
      ² | yea and don't even get me started on the morons that are trying to make ffmpeg usable for mere mortals with and have entire start-ups around it and their genius plan is to just make chatGPT or some other LLM "learn" ffmpeg syntax by examples and then have you prompt your way into getting the command that does what you want. Yeah and it works about as good as you'd expect
      So yeah, I have pins and needles that I'm sitting on. Here's to hoping this will be the answer to all of those, and many, many, many more

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

      This is getting into some serious daydreaming territory, but I hate using CAD programs so much I think they're fucking disgusting from a usabillity standpoint. No, F360 is not better, shut the fuck up. No, whatever AI-powered piece of crap Zoo.dev are doing is not the solution either. I want to have the power of openSCAD with the speed and ergonomics of Blender's Geo Nodes
      That would be a dream come true for me and so many other engineers the world over.

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

      I feel incredibly honoured you think so

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

    game dev would be really interesting with this in the workflow

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

      Oooooh yeah it will, can‘t wait to get into making my first person game :D

  • @thegoldenatlas753
    @thegoldenatlas753 Месяц назад +3

    This is why I think rust would thrive under a node display, the type system is so powerful in rust.

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

      we might look into implementing a similar ownership mechanic with this node editor.

    • @thegoldenatlas753
      @thegoldenatlas753 Месяц назад +1

      @@Kronark I'm possibly gonna be implementing a 1:1 rust node editor for bevy game engine anyways.
      Your videos have helped solidify my confidence in the concept.

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

      Glad I could help! :D

    • @thegoldenatlas753
      @thegoldenatlas753 Месяц назад +1

      @@Kronark if you have any advice for it I'd love to hear it

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

      You'll need the frontend visualisation of your networks earlier than you think, because you won't be able to wrap your head around some concepts as easily otherwise.
      I initially tried to implement the backend first, then the frontend - but then I ran full speed into the brick wall that is data types and socket construction. I just could not implement it properly without seeing the actual node network.
      Also, your actual core compilation function will get very complicated very fast. Comment EVERYTHING and maybe even write down the algorithm on paper. These node graph editors are absolute beasts when it comes to edge cases.

  • @SamualN
    @SamualN Месяц назад +1

    nothing can beat hindley milner

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

    I like these shorter more consise videos!

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

      Glad you do! They're much easier to produce. Although I really can't wait to go back to applied topics, these explainer episodes aren't performing super well...

  • @DerRobert28
    @DerRobert28 Месяц назад +1

    What kind of node editor do you use and where can one get it (maybe download)?

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

      Completely custom made UI. And not for download currently I‘m afraid - still quite unstable. We‘ll be implementing a release build using this prototype, including a separate node graph engine - which will be publically usable then :)

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

    These explanation videos are always interesting though I can't wait to see the executables too! I also think small but frequent updates are better.
    Just a quick question, Does the colors of the node represent something or is it just that something you choose ?

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

      i guess on custom nodes you'll be able to choose whatever, but built-in ones are going to be dark gray-ish

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

      Yeahh, i‘m still struggeling to get into a good edit-upload flow… more frequent wont be possible right now
      You can choose the colours in a settings node that connects to the output root. I don‘t think i‘ve ever shown it as it‘s pretty irrelevant for now. But yeah, basically just syntax highlighting for node graphs :)
      And as @darkfllame correctly guessed, the built-in ones are all black, which appears as gray due to a filter effect for UX reasons.

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

      Just doing a little post on the community page goes a long way, don't burn yourself out. 😊

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

    I have had an idea for a few years that I have finally started implementing: a redstone computer in Minecraft that compiles and executes brainfuck source code written with renamed paper items. I have an addressable 8-bit register module (4-bit address space) that I am experimenting with expanding to an 8-bit address space to use for RAM, program ROM, and stdin and stdout buffers; and an 8-bit counter register module that can increment, decrement, add a 4-bit offset, and subtract a 4-bit offset. Once I have the addressable register module upgrade complete, I'll make the op-code decoder, and then an intermediate assembler that assembles op-codes with 4-bit operators and 4-bit operands, and then I'll need to figure out how to compile the brainfuck into the assembly language and put it all together with some hexadecimal displays. I do not think that anyone has ever made a compiler in Minecraft, so it is an interesting project.

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

    How are you handling types which are arrays of other types? Your videos are fascinating, I’ve been independently implementing something similar over the past 12 months myself, it’s so interesting seeing how our approaches are similar and different. Arrayable types were one of my biggest challenges!

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

      Nice! :)
      Actually hadn't thought about arrayable types so far, but I'll probably create an abstraction layer for typed arrays which take a stride as a parameter equal to the size of the internal type. Anything else really is just an array of pointers, which is an entirely different problem on its own. We can build type names dynamically, so it would be easy to generate a handle for any typed array data types. So yeah, probably a node that has a length and stride parameter, an internal data type specification (there will be a used type autocomplete feature which recommends previously used type strings) and then a repetitive input socket for all values to be stored on declaration. I'll eventually find a way to calculate that stride automatically too. So something along those lines :)
      What's your approach?

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

      @@Kronark thanks for the detailed reply! Your implementation sounds very thorough 👍 There’s not much in common with my approach as our use cases are very different at this degree of detail, but I’ll share some more about how I went about it:
      My app is basically a CMS for constructing a dynamic programming language, where each entry in the CMS represents a single pure function, with zero or more fields associated, each of which has a type. If it’s an input field, the type applies both inbound and outbound (as values can be carried across between multiple nodes), and if it’s an output field, the type applies to the result once the computation has run.
      The system I’ve built allows me to associate one or more JSON-native type(s) against each field. For example, `number`, `string`, etc. - I decided early on that using JSON/JSONSchema as a base was important for portability, especially given LLMs are being modelled on function calls from JSON Schema specs.
      Each field is assigned a JSON-compatible type, but has an additional Boolean flag to indicate if the value is arrayable. In my context, I want each node to be as flexible as possible on the inbound side: if a field expects an array of strings, it accepts either a scalar string or an array of strings, and if it’s marked as arrayable it automatically wraps scalars in an array before executing the underlying function.
      On the output side things are a little more complex due to the nature of my app. In very simple terms it’s like a parametric design tool, so tries to strike a balance between simplicity and flexibility.
      Given a scalar input, if the node expects to return a scalar output it will do so by default. But if the scalar input is passed as an array of scalar values then the behaviour of the node changes automatically. My system will run the underlying node action once per value in the input array, then return an array of mapped values as output, instead of a single scalar.
      This is only practical as I’ve built the system around this design requirement (precise yet flexible I/O types), so almost every node expects to work with either single or multiple values in any context. I also have flags for power-users to change how array inputs are handled (eg treating an array as a single value instead of processing each element), for edge cases.
      Thanks for the great channel and would love to discuss more! Hope you found this interesting 🙌

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

    damn, thats kinda cool. Maybe make the connections a bit more dynamic? Like Drag from one socket to another. since that feels more down the earth and interactive

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

      A drag and drop approach isn‘t as intuitive as you may think. It‘s actually kind of annoying in larger networks if you have two nodes far away from each other :)
      But I may overhaul those controls a bit more in the release build, maybe allow customisation via settings

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

    can I download/build this compiler somewhere please I'm dying to mess around with it.

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

      not yet, sorry :) we'll be building a release build eventually though, and it will be free.

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

    Please add a way to publish node graph configurations for everyone to view inside the editor. Please I'm begging you

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

      Already planned once we get into making this a publically available product. The same website you‘ll be able to get the release build for free will also host a node sharing platform for downloading additional node graph modules - and features for sharing your own creations amongst each other.

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

      @@Kronark holy crap this is going to cause waves

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

      I f*cking hope so

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

    showing a stock video of html while talking about source code should be illegal😂
    good video as always though

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

      You have no idea how criminally little stock footage for programming there is 😂 but it got the message across :P
      Thanks!

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

    See the type system of Julia, how it relates to multiple dispatch: How do you think does your type system compare?

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

      I‘d say it‘s pretty similar tbh. Instead of defining multiple functions with the same name and different content, all the internal variations are stored in the same function / node. Might actually save some effort and make maintence easier, since you don‘t have multiple function bodies but could instead funnel different data types into the same node subgraph performing the actual operation.
      In general, anything Julia‘s type system can do, this compiler can do as well.

  • @eliasostby7127
    @eliasostby7127 Месяц назад +7

    .

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

    Scratch.