Elm Test Distributions

(martin.janiczek.cz)

37 points | by todsacerdoti 3 days ago ago

15 comments

  • tybug 2 days ago

    Nice! "testing your test code" is particularly important when dealing with PBT distributions, especially when your generator gets more complicated.

    Tyche [0] is another cool tool for addressing the same problem, visualizing the PBT distribution but not making assertions about it.

    [0] https://github.com/tyche-pbt/tyche-extension

  • ibizaman 2 days ago

    That’s really cool. I learned to love (stateful) property testing through a project at work to migrate drivers for MongoDB. https://blog.tiserbox.com/posts/2024-02-27-stateful-property...

  • jiehong 2 days ago

    How Elm doing? Still v0.19.1 at first glance.

    Anybody has an accurate view of the current status?

    • ch4s3 2 days ago

      Basically dead. The core hasn’t been touched publicly since 2022, and the package ecosystem is closed. People will argue that it’s still usable but the fork ROC has more traction.

      https://www.roc-lang.org/

      • tasuki 2 days ago

        You could say "dead", or you could say it's done, complete.

        I'm a backend developer by trade. Because of Elm, I take every opportunity to do frontend. Elm made me love frontend.

        Yes, there are things that are missing. Web sockets? Tough luck, it's ports! Or maybe you don't need web sockets.

        I'd take Elm over the alternatives (cough React cough) anytime without hesitation.

        • ch4s3 a day ago

          Elm has a bunch of known bugs that the BDFL isn’t fixing, and he totally fucked js interop with the promise that more packages were on their way then he stopped approving new packages.

          Evan abandoned an unfinished project and rug pulled a lot of people with the 0.19 release.

      • frfl 2 days ago

        The actual fork is https://gren-lang.org/

        • ch4s3 a day ago

          You are correct.

      • k_bx 2 days ago

        Isn't ROC back-end language?

        • tasuki 2 days ago

          Roc introduced the concepts of "platforms"[0]. I wanted to explain here, but gave up after three tries: just go read the linked page please!

          [0]: https://www.roc-lang.org/platforms

          • k_bx 2 days ago

            It looks more like "conceptually solved" thing, but I would wait and see a number of real-world web apps to compare it with Elm before I'd understand how good it is.

      • terminatornet 2 days ago

        roc isn't a fork of elm, it's more inspired by the language and run by a former elm core team member.

        • ch4s3 a day ago

          Yeah I was mistaken, the fork is gren.

    • jweir 2 days ago

      There is the Lamdera compiler

      https://github.com/lamdera/compiler

      We don’t use it though. Elm 0.19.1 just works. New packages and plenty of support. It’s difficult to comprehend in a world of endless updates that maybe something doesn’t need updates.

    • tasuki 2 days ago

      I don't have an accurate view, but I understand Evan is up to something. He likes to take his time.