‹ BackHN Continuity

Thread

Bend 2 and the Vibe-Coding Trap

327 points · 235 comments · LiamPowell

  1. wg0 · · focus · HN ↗
    Some noteworthy lines from the README.md[0]:

    > - The compiler (not kernel) is 99% AI-written and has not been fully audited yet.

    > - Strings are linked lists of characters, so text processing is slow.

    [0]. <a href="https:&#x2F;&#x2F;github.com&#x2F;bendlang&#x2F;bend&#x2F;tree&#x2F;main" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bendlang&#x2F;bend&#x2F;tree&#x2F;main

    1. LightMachine · · focus · HN ↗
      So are Haskell&#x27;s, since 20 years ago, with no options for years?

      We will introducing binary buffers eventually. The project is new...

      1. bunderbunder · · focus · HN ↗
        “No options” simply isn’t true. Here’s a guide to many of the options: <a href="https:&#x2F;&#x2F;hasufell.github.io&#x2F;posts&#x2F;2024-05-07-ultimate-string-guide.html" rel="nofollow">https:&#x2F;&#x2F;hasufell.github.io&#x2F;posts&#x2F;2024-05-07-ultimate-string-...

        Now if you’re asking why the basic prelude String type remains as it is, that’s because changing it would break more code than it’s worth, at least as far as prelude’s maintainers are concerned. This is no different from how standard C strings remain a null-terminated sequence of bytes even though that’s been awful for everyday use for at least 30 years.

        1. LightMachine · · focus · HN ↗
          Note that using linked lists for strings is actually more &quot;parallel friendly&quot; because you can take the head&#x2F;tail and spread it around 16k GPU cores in O(1), unlike in Haskell, unlike arrays, which require a linear copy, becoming quadratic. So, the right &quot;default type&quot; isn&#x27;t that clear on Bend, because GPUs behave very differently from CPUs.

          That said, yes, we definitely should have a compact Text type. I&#x27;ll add it over the weekend.

          1. imtringued · · focus · HN ↗
            Splitting a linked list is an O(n) operation.

            You can slice up arrays in O(1).

            The default type is incredibly clear to me.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.