Tacit Talk Episode 3: Kap with Elias Mårtenson

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

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

  • @c4tubo
    @c4tubo 5 месяцев назад +1

    Such a great interview! I really like Elias' points about the tension of expressiveness between very concise code in the REPL being good but that it can backfire in large bodies of code--although I still personally lean towards terseness in both.

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

    24:04 Can you link the problem please? The one you tried to turn into a scan?

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

      It is AOC 2023 Day 4B: adventofcode.com/2023/day/4

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

      @@code_report You need a way to simulate `for j in range(): acc[j] += acc[i]`. It's ugly but you can call `lambda i, j, acc: [x+acc[i] if i==j else x for x in acc]` in a fold. If you want I'll write a solution in Haskell without explicit recursion

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

      Thanks! I'm looking for examples to motivate a finite-state-machine oriented language. You need to simulate: for j in range(): acc[j] += acc[i]`. It's ugly but you can call lambda i, j, acc: [x+acc[i] if i==j else x for x in acc] in a fold. I could write you a solution in Haskell without recursion if you are interested

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

    // z^3 Array of Functions
    [1..10,1..10]@[➕,➖,SIN]
    //Arrays of input to Arrays of Functions.
    // Here ➕is SUM operation. ➖ is MINUS operation etc.
    // Can also be
    [1..10,1..10]@[SUM,MINUS,SIN,"a+b"]
    // @ - Apply Operator