Koleman Nix
Koleman Nix
  • 85
  • 143 568
Christmastide of Compiler - Generic typeclass implementations
x.com/kolemannix
github.com/kolemannix/k1
0:00 catchup and problem statement
5:00 introducing the type variables into scope
9:00 borrow checker is fun
14:00 yes I see now that I'm cloning twice
14:10 sacrificing cycles to the borrowck
18:00 Next issue revealed
26:00 Type variable checking bug confirmed
29:00 closing ideas
Переглядів: 329

Відео

Christmastide of Compiler - Towards an 'Iterable' Typeclass
Переглядів 32919 годин тому
x.com/kolemannix github.com/kolemannix/k1 0:00 Ability parameters 4:00 Sketching out an Iterable ability 8:00 Sketching out an Iterator ability 10:00 First bug 12:25 ding ding ding 12:30 debugging 15:40 don't know my own syntax 16:00 finish implementing basic iterator so we can debug 22:00 actually debugging 26:30 choosing a fix 30:00 Identifying and correcting a misunderstanding 38:00 correcte...
Advent of Compiler 2024 - Language demo and Day 1 solution
Переглядів 926День тому
x.com/kolemannix github.com/kolemannix/k1
Advent of Compiler 2024 - Quicksort and stdlib improvements!
Переглядів 313Місяць тому
x.com/kolemannix github.com/kolemannix/k1
Making a programming language - Fixing enums
Переглядів 8242 місяці тому
x.com/kolemannix github.com/kolemannix/k1
Making a programming language - A simple string type!
Переглядів 1,3 тис.2 місяці тому
We are replacing our compiler builtin string with one that is defined entirely within the language itself! I am aware this is a naive "one byte per character" string which obviously doesn't handle utf8, we'll worry about that later! For now we just want to achieve parity with the old builtin types so we can simplify the core language. x.com/kolemannix github.com/kolemannix/k1
Making a programming language - Dynamic arrays [2/2]
Переглядів 4493 місяці тому
We are replacing our compiler builtin Array with one that is defined entirely within the language itself! x.com/kolemannix github.com/kolemannix/k1
Making a programming language - Dynamic arrays [1/2]
Переглядів 7483 місяці тому
We are replacing our compiler builtin Array with one that is defined entirely within the language itself! x.com/kolemannix github.com/kolemannix/k1
Making a programming language - Exhaustive pattern match on complex types [2/2]
Переглядів 1 тис.3 місяці тому
Time to test out our exhaustiveness checking plan on general structs and enums, not just booleans and options! x.com/kolemannix github.com/kolemannix/k1
Making a programming language - Exhaustive pattern match checking [1/2]
Переглядів 1,3 тис.3 місяці тому
It's time to check that all patterns are handled! This is a fun one that I had been putting off for awhile. x.com/kolemannix github.com/kolemannix/k1
Building my own programming language - Generic Structs [2/3]
Переглядів 4765 місяців тому
In which we get a simple case of generic types working! x.com/kolemannix github.com/kolemannix/bfl
Building my own programming language - Generics! [3/3]
Переглядів 665 місяців тому
x.com/kolemannix github.com/kolemannix/bfl
Building my own programming language - Generic Structs [1/3]
Переглядів 7835 місяців тому
x.com/kolemannix github.com/kolemannix/bfl
Building my own programming language - Syntax for optional values
Переглядів 8555 місяців тому
In this one I added a '?' operator for optionals similar to the JS '??' nullish coalescing operator. 0:00 Intro 21:00 Synthesizing the desugared code 41:00 Syntax issue with ‘else’ re-use 52:30 Victory! Wrapup x.com/kolemannix github.com/kolemannix/bfl
Building my own programming language - Control-flow based type inference
Переглядів 4655 місяців тому
Building my own programming language - Control-flow based type inference
Compiler Programming in Rust - De-duping types
Переглядів 5185 місяців тому
Compiler Programming in Rust - De-duping types
Compiler Programming in Rust - Progress Update - Enums and Abilities
Переглядів 2856 місяців тому
Compiler Programming in Rust - Progress Update - Enums and Abilities
Parser refactoring - No commentary; keyboard mic
Переглядів 8758 місяців тому
Parser refactoring - No commentary; keyboard mic
Adding 'for' loops to my programming language - 5 - Tidying up and fixing bugs [Rust/LLVM]
Переглядів 1,2 тис.8 місяців тому
Adding 'for' loops to my programming language - 5 - Tidying up and fixing bugs [Rust/LLVM]
Compiler Programming in Rust - Adding a declaration pass to our Compiler!
Переглядів 4599 місяців тому
Compiler Programming in Rust - Adding a declaration pass to our Compiler!
Adding 'for' loops to my programming language - 4 - Yielding results! And cutting scope [Rust/LLVM]
Переглядів 74710 місяців тому
Adding 'for' loops to my programming language - 4 - Yielding results! And cutting scope [Rust/LLVM]
Adding 'for' loops to my language 3 - 'yield'ing results Python-style
Переглядів 1,2 тис.10 місяців тому
Adding 'for' loops to my language 3 - 'yield'ing results Python-style
Adding 'for' loops to my language - Part 2 - Desugaring
Переглядів 19510 місяців тому
Adding 'for' loops to my language - Part 2 - Desugaring
Adding 'for' loops to my language - Part 1 - Parsing and typechecking
Переглядів 29011 місяців тому
Adding 'for' loops to my language - Part 1 - Parsing and typechecking
Compiler Programming in Rust - Implementing optionals (codegen phase)
Переглядів 40411 місяців тому
Compiler Programming in Rust - Implementing optionals (codegen phase)
Compiler Programming in Rust - Debug Info w/ LLVM and DWARF
Переглядів 65711 місяців тому
Compiler Programming in Rust - Debug Info w/ LLVM and DWARF
Compiler Programming in Rust - Generic Type Inference
Переглядів 90011 місяців тому
Compiler Programming in Rust - Generic Type Inference
Compiler Programming in Rust - Project Introduction and Demo
Переглядів 2,6 тис.11 місяців тому
Compiler Programming in Rust - Project Introduction and Demo
Road to Chess Competence #22
Переглядів 19911 років тому
Road to Chess Competence #22
Road to Chess Competence #21
Переглядів 3211 років тому
Road to Chess Competence #21

КОМЕНТАРІ

  • @emptycode1782
    @emptycode1782 16 годин тому

    raw dog coding is my thing, and youtube seems to understand it.

  • @it1shka
    @it1shka 9 днів тому

    from the first glance, this language is similar to Zig. Love it!

  • @seppotaalasmaa3404
    @seppotaalasmaa3404 Місяць тому

    Who needs a programming language anyway? one could just do ones and zeros like this: 0010100101010101010101000101

    • @KolemanNix
      @KolemanNix Місяць тому

      It's truly all just syntactic sugar

  • @swedishpsychopath8795
    @swedishpsychopath8795 2 місяці тому

    Too much boilerplate superfluous stuff. You need to trim it down A LOT! Get rid of semicolons, colons and "type", "fn", "let", "val". Replace print with "?" or something similar, but simple. Have only 1 datatype that corresponds to a byte and BUILD upon that to make the other types by using OOP principles. BTW: do you have ANY formal training in compiler design?

    • @voltairespuppet
      @voltairespuppet 2 місяці тому

      This feels like a sarcastic post, but it's hard to tell these days

    • @KolemanNix
      @KolemanNix 2 місяці тому

      Indeed, the part about turning a Byte into other types using OOP was my favorite part. Also completely missing that we were looking at a very contrived sample program that was explicitly exercising every combination of explicitly passed vs inferred type parameters

    • @swedishpsychopath8795
      @swedishpsychopath8795 2 місяці тому

      @@KolemanNix 😂

  • @Mitazad
    @Mitazad 2 місяці тому

    This was really interesting! I will have to go back and watch the full series, maybe finally I can overcome the hump and finish building my just for fun language.

  • @joshuarowe8410
    @joshuarowe8410 2 місяці тому

    zed gang

  • @Dom-zy1qy
    @Dom-zy1qy 3 місяці тому

    As someone who doesn't really know rust syntax (or rust) I couldn't tell if you were writing rust or your own language lol.

  • @wasdasdasdcasdc
    @wasdasdasdcasdc 3 місяці тому

    whats the color scheme called

    • @KolemanNix
      @KolemanNix 3 місяці тому

      If you copy my colors you will prosper as a programmer.

    • @KolemanNix
      @KolemanNix 3 місяці тому

      This is Zed's "One Dark"

  • @johnlimusicofficial220
    @johnlimusicofficial220 3 місяці тому

    What text editor are you using?

  • @potatocoder5754
    @potatocoder5754 3 місяці тому

    Good luck with your progress! 🤗

  • @KolemanNix
    @KolemanNix 3 місяці тому

    So apparently I had no idea how realloc worked! The fix was in `fn _grow()` to actually use the pointer returned by realloc as the new data. In the case there's not space for the new allocation in-place, the new pointer is returned. This is why it only failed sometimes!

  • @Debrugger
    @Debrugger 3 місяці тому

    9:40 Never understood the the mantra that "long" files are bad. Do people still use ed or something? Like it makes zero difference if grepping for a function or going to definition takes me to a different file or not, modern editors allow you to work with the code's structure independently of file layouts. Files are just the best we have right now, but for sure not the best we can do. Some languages like Unison or SQL stored procedures don't even have files at all, how about that?

  • @852Duarte
    @852Duarte 3 місяці тому

    This video is truly amazing. It appeared randomly in my recommendations tab , and I'm very glad that I chose to watch it

  • @alexanderkirilov7820
    @alexanderkirilov7820 3 місяці тому

    So glad that UA-cam suggested this gem. Can’t wait to catch up with the series. But it does seem like this is a part of a stream. I would love if you drop a link (didn’t see any in the description or looking around)

    • @KolemanNix
      @KolemanNix 3 місяці тому

      It's a streaming-style recording because I don't have time to plan anything better and being live is more difficult on my schedule. But I may start streaming soon, thanks for your support!

  • @MrKeebs
    @MrKeebs 4 місяці тому

    Thanks for breaking down the pattern matching paper. I am actually working on a script language on the side and I also have the ambitious goal to support it and this video confirmed that I was almost on the right path as well. Keep it up!

    • @KolemanNix
      @KolemanNix 3 місяці тому

      This Rustlang PR github.com/rust-lang/rust/pull/50912/files contains comments that explain the paper in layman's terms as well as implement some more advanced patterns: "or" patterns, which are quite easy, and exhaustive integer matching, which is quite hard!

    • @MrKeebs
      @MrKeebs 3 місяці тому

      @@KolemanNix that's a very good resource, thank you for sharing!

  • @marshallbcodes
    @marshallbcodes 5 місяців тому

    Hell yea Zed!

  • @patrickshepherd1341
    @patrickshepherd1341 5 місяців тому

    This is really cool, man! I actually got on a binge about a month ago wanting to learn how to make a programming language (I've programmed about 10 years and never actually put my hands on the process). Pulled up a tutorial in python and followed it long enough to get a bunch of the basics like basic math expressions, conditionals, loops, and functions. I just finished the core of my test suite (700 test cases lol) in my own language! I went on after the tutorial and made structs, when-triggers that can be set to fire once or every time a condition is met, dot operators, indexing and slicing, static and dynamic types, importing code from other files, a way to hook functions to structs with a one-liner in the struct definition that avoids a lot of copy and pasting, some basic file io and built in functions, and some basic in-language error handling! Lol I've been obsessed with this project. Anyway, I just found your videos and I'm really interested in these generics. I'll definitely be watching the whole playlist! I don't want to make an unsolicited plug for my own language, but I'd love to link you to the repo if you ever want to take a look out of curiosity. I'd love any feedback; I'm a good programmer but I'm REALLY inexperienced with language design, so I'm happy to hear any thoughts you might have.

    • @KolemanNix
      @KolemanNix 5 місяців тому

      Feel free to share it! Disclaimer is that I'm not a compiler expert myself, though I am a highly successful programmer! There's nothing like the thrill of creation, great to hear you 'caught the bug'! Keep building and learning!

  • @tgirlshark
    @tgirlshark 5 місяців тому

    the syntax of your language looks very neat, I had smth similar in mind with "type" semantics

  • @Singlton
    @Singlton 5 місяців тому

    What .bfl stands for

    • @KolemanNix
      @KolemanNix 5 місяців тому

      "Baby's first language" :) It's a sort of temporary name for the project until I can think of a better one.

    • @Singlton
      @Singlton 5 місяців тому

      @@KolemanNix 😄

  • @arsenbabaev1022
    @arsenbabaev1022 5 місяців тому

    Do you use LLVMC api with inkwell to generate the llvm ir? I have massive problem of LLVMC just not being included in official releases, only Windows seem to have prebuilt binary. Its totally hopeless, cannot use my compiler on linux. How did you solve this problem, are there any good places to find LLVMC binaries?

    • @KolemanNix
      @KolemanNix 5 місяців тому

      I can't speak to Linux but my process to getting thinks working with Inkwell was: - Install LLVM (did from source and homebrew at diff times) - Set LLVM_SYS_PREFIX appropriately so that inkwell / llvm_sys can find the LLVM install Had some linking issues involving zstd when I upgraded to LLVM 15 so had to add that as a dependency to my project, which worked.

  • @KolemanNix
    @KolemanNix 6 місяців тому

    There is a lot of head scratching time and wandering around the problem space, so not exactly action-packed! I understand this is pretty dry content but I want to share the real process not some manufactured false highlight reel, and entertainment is not my primary goal In Fred Brooks' terms I'd say we're 80% tar pit and 20% imagination castles in this one.

  • @MrKeebs
    @MrKeebs 6 місяців тому

    Love the work you're doing on the compiler, thanks for the video!

    • @KolemanNix
      @KolemanNix 5 місяців тому

      Thanks for the comment!

  • @mcol3
    @mcol3 8 місяців тому

    Font size way too small

    • @KolemanNix
      @KolemanNix 6 місяців тому

      Agreed! Trying to improve on this

  • @kfkfkfk-or1nk
    @kfkfkfk-or1nk 8 місяців тому

    Hello, I’m new to coding and I can’t choose an ide for programming could you advise me, I’m learning Python at the moment, and in the future I would also like to learn Rust

    • @KolemanNix
      @KolemanNix 5 місяців тому

      I would recommend just getting started with VSCode! Don't worry so much about your IDE just find a way to get programming!

  • @johnathanregissilva
    @johnathanregissilva 8 місяців тому

    which code editor do you use?

    • @KolemanNix
      @KolemanNix 8 місяців тому

      This is RustRover

  • @angelo9915
    @angelo9915 8 місяців тому

    this is the best keyboard ad i've ever witnessed

  • @harvey8232
    @harvey8232 8 місяців тому

    WHAT KEYBOARD HOLY

  • @anon_y_mousse
    @anon_y_mousse 8 місяців тому

    Given your video description I'm wondering if someone complained about you talking in other videos. If they did you should ignore them because long stretches of nothing but code flying across the screen is boring. It'd be better if you described what you were doing and perhaps added some color commentary on top. Also, you should zoom in a lot so that the code can be read more easily. I do wish you didn't have LLVM in your title because it'd be interesting to see someone write a code generator for the Mac from scratch. I've pretty much finished my code generator for x86 and I'm currently working on the one for ARM, but I'm not sure if I'm going to target Mac or not. I'm sure it's not hugely different from ARM, but likely enough to be annoying.

    • @linminhtoo
      @linminhtoo 8 місяців тому

      agreed

    • @KolemanNix
      @KolemanNix 8 місяців тому

      Thanks for your comment! I was just too tired for commentary today; plenty of other videos with more commentary! I'd love to do my own backend for this language at some point but can only focus on so many things at once, maybe soon! Good luck on your ARM backend; I think you'll crush it if you already handled x86.

  • @justiceessiel6123
    @justiceessiel6123 8 місяців тому

    to get you .. are you creating a programming language from scratch with rust

    • @GOOB3000
      @GOOB3000 8 місяців тому

      yeah he should add info to his video descriptions

    • @KolemanNix
      @KolemanNix 8 місяців тому

      Yes. I'll link the playlist in the description going forward.

  • @che5ari
    @che5ari 9 місяців тому

    Great video series. The sound level is quite low and it will be great if you can increase that for future videos.

  • @mattbettcher
    @mattbettcher 10 місяців тому

    Super cool, I'm working on a similar project!

  • @uthoshantm
    @uthoshantm 10 місяців тому

    It can be done in C, C#, JavaScript, Java... Then what?

    • @KolemanNix
      @KolemanNix 2 місяці тому

      No idea what you mean!

  • @pablino234
    @pablino234 10 місяців тому

    omg, just for fun hahahah

  • @Sync03436
    @Sync03436 10 місяців тому

    This is already hard enough, but it makes you think about how we just take LSP's for granted. Stuff is much harder without them.

  • @Nazionale-p2i
    @Nazionale-p2i 10 місяців тому

    good video

  • @Lantos1618
    @Lantos1618 11 місяців тому

    have you seen the for loop in zig it has quite a nice representation of "it" for(values) | value | { ....} also your doing great.

    • @KolemanNix
      @KolemanNix 10 місяців тому

      Yes I have! The 'if' expressions in this language actually use the same binding syntax |<ident>|. I also like that the Zig construct puts the iterable first, which is arguably the "more important" aspect of the loop than the binding name.

  • @SnoozeDog
    @SnoozeDog 11 місяців тому

    Nice!

  • @KolemanNix
    @KolemanNix 11 місяців тому

    Finally implementing some 'for' loops! We get through the parsing and some of the typechecking in this first session. There's still more questions than answers at this point though! Sorry for the bad audio.

  • @lhommevert5249
    @lhommevert5249 11 місяців тому

    Cool initiative!

  • @Shxvang
    @Shxvang 11 місяців тому

    I might watch this later to learn about compilers :D

  • @KolemanNix
    @KolemanNix 11 місяців тому

    This is an older recording so sorry for the tiny font size! I thought I'd still upload it since it will be cool to have the original implementation documented when I come back to optionals and share the current, much more solid solution, at least as far as codegen is concerned.

  • @KolemanNix
    @KolemanNix 11 місяців тому

    The beginning of the recording cut off. It was me saying: "I'm going to work on a feature that I planned not to build. That is ... generic type inference.

  • @dipeshsinghjr.4000
    @dipeshsinghjr.4000 2 роки тому

    You are actually using mac book ten years back from now... Great man... You can actually see that how much tech has been grown

  • @tessameynaerts8449
    @tessameynaerts8449 3 роки тому

    Awesome cover! You have any sheet music for this? I want to learn this song for a long time but I can't find it anywhere :(

  • @joniespeleta3797
    @joniespeleta3797 4 роки тому

    You’re amazing!

  • @stephencochran2701
    @stephencochran2701 4 роки тому

    you hit 3k views!!! sheet music???

  • @zahiterdemguzel4581
    @zahiterdemguzel4581 6 років тому

    It is great man I like you thanks

  • @mertemreozbek7213
    @mertemreozbek7213 6 років тому

    This app working just apple or its can be working another platforms ? if ure answer this question i would be very pleased @KolemanNixTV

  • @bartroels5980
    @bartroels5980 7 років тому

    Nice done!!

  • @GAVProductionsmovies
    @GAVProductionsmovies 8 років тому

    where is the sheet music :(