Advent of Code ... in Types Only!

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 22

  • @zorzysty
    @zorzysty Рік тому +13

    Instead of introducing Length type, I believe you could just access length property on the array, like this: [...OfLength, ...OfLength]['length'].
    Cool video BTW!

    • @nightfury1250
      @nightfury1250 10 місяців тому +1

      I rewrite and test all code in video myself and also tried your point instead of using Length type we can use the length propery of an array by doing that way
      we get an type error in the Sum type (? Sum)
      informing
      Type 'Add' does not satisfy the constraint 'number'.
      btw great point 😊

  • @aaazureee
    @aaazureee Рік тому +8

    this messes with my brain ICANT

  • @matthewvaccaro8877
    @matthewvaccaro8877 2 дні тому

    This is the most absurd TS video of all time and I love it.

  • @frankiannelli5025
    @frankiannelli5025 Рік тому +3

    This is the such refreshing dev content. Really like your approach and style

  • @JChen7
    @JChen7 Рік тому

    Love these examples of "just because you can, doesn't mean you should" 10/10

  • @Fullflexno
    @Fullflexno Рік тому +1

    You Are The best man! Welcome back. Looking forward to more content🤛

  • @offroaders123
    @offroaders123 Рік тому

    Glad you're back! Hope you're doing all good 🙂

  • @tommysullivan
    @tommysullivan Рік тому +1

    This is awesome. I wonder if the type system could ever become as powerful as that in Idris? 🤔😜

  • @deadlyecho
    @deadlyecho Рік тому +3

    What in the actual fuck is that 😮

  • @guidodinello1369
    @guidodinello1369 Рік тому +1

    This is wicked

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

    can we do it half-way like having a type of certain number[] and then
    somehow instantiate it and reduce to a sum?
    (I want to get an answer to advent 1 finally)

  • @ilangated
    @ilangated Рік тому

    Could you consider this functional programming?

  • @helleye311
    @helleye311 Рік тому

    Now I wanna try doing day 1 part 2 with types. Or day 2. probably not 3 though, since it's a 2D problem, would be hard with just types.

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

    Complex, will ask chatgpt to explain this later

  • @marcush3997
    @marcush3997 Рік тому

    Been waiting for a new vid to drop. So glad I was doomscrolling

  • @sarthakyadav371
    @sarthakyadav371 Рік тому

    Amazing!

  • @REAL_Fred_Walker
    @REAL_Fred_Walker Рік тому

    great video

  • @HagbardCelineOnRust
    @HagbardCelineOnRust Рік тому

    just wow. types only form beginnign to end

  • @rockNbrain
    @rockNbrain Рік тому

    holly molly dude

  • @omarojmb
    @omarojmb Рік тому +1

    🤯

  • @sentinelaenow4576
    @sentinelaenow4576 Рік тому

    Awesome video! Although it's really interesting and fun as an exploration of a proof of concept, it was very had to watch this and not puke. TypeScript is so toxic, bloated and unintuitive that it feels absolutely disgusting. This is like turing complete concentrated pointlessness. It's a very curious concept, like, how far can we stretch this monstrosity? I'm still trying to get my head around this, it feels like a coding horror movie. Thanks.