GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    someodd (someodd@fosstodon.org)'s status on Sunday, 01-Dec-2024 06:46:30 JST someodd someodd

    Why #Haskell ? Thread.

    It's such a different way of thinking fundamentally due to the alfonzo/turing split and this has lead to unique features that slowly bleed into the general language ecosystem. One of my favorite features of Haskell is exactness and correctness. The type system lends itself to not just catching the kind of errors that would be normally runtime errors in some other languages, but it it also lends itself to things like formal verification and proof assistants like...

    In conversation Sunday, 01-Dec-2024 06:46:30 JST from fosstodon.org permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: www.thread.it
      THREAD | Soluzioni software per l'automazione industriale
      from bellintani
      Con sede a Udine, THREAD progetta e sviluppa software di automazione industriale su misura, secondo le specifiche applicazioni ed esigenze.
    • alcinnz repeated this.
    • Embed this notice
      someodd (someodd@fosstodon.org)'s status on Sunday, 01-Dec-2024 06:46:28 JST someodd someodd
      in reply to

      In this code above is I actually "verify" important properties of the important thing: file ranking works as expected.

      It's explicitly NOT "if I give x input I get y output" style unit test. The "statistical verification" comes from the fact that you can programmatically generate inputs and verify the outputs, and thus generate >1,000 test "cases" from just one actual property test.

      And this is because, I think, you're dealing with more abstract logic, which Haskell really lends itself to.

      In conversation Sunday, 01-Dec-2024 06:46:28 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        http://expected.It/
    • Embed this notice
      screwlisp (screwtape@mastodon.sdf.org)'s status on Sunday, 01-Dec-2024 06:46:28 JST screwlisp screwlisp
      in reply to

      @someodd what do you think of all the prior lazy and formal work in lisp (or like, testing if you must) compared to Haskell's later developments?

      I got really into Lisp's Series[1] recently, since I found it just generated a better fizzbuzz than I manually wrote myself in my initial test.

      [1]https://dspace.mit.edu/bitstream/handle/1721.1/6035/AIM-1082.pdf?sequence=2&isAllowed=y

      In conversation Sunday, 01-Dec-2024 06:46:28 JST permalink

      Attachments


    • Embed this notice
      someodd (someodd@fosstodon.org)'s status on Sunday, 01-Dec-2024 06:46:29 JST someodd someodd
      in reply to

      ... #LiquidHaskell (restriction types, SMT solver) and the Isabelle proof assistant.

      For example, look at the kind of assurances we can make about data at the type-level. This means the SMT solver can assure that certain logical constraints on types are provably true.

      My code to verify a file ranking algo I made:

      https://github.com/someodd/bore/blob/master/src/Bore/SpacecookieClone/Search/Verified.hs

      In conversation Sunday, 01-Dec-2024 06:46:29 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        http://true.My/
      alcinnz repeated this.
    • Embed this notice
      someodd (someodd@fosstodon.org)'s status on Sunday, 01-Dec-2024 06:46:29 JST someodd someodd
      in reply to

      But also, I think Haskell was maybe one of the first places you saw property testing, and I think it's kind of the norm in this ecosystem. Just look at a unique way of thinking testing *properties* rather than just "dumb" unit tests are:

      https://github.com/someodd/bore/blob/master/test/Spec.hs

      What's happening here is a kind of statistical verification of *properties* that should prove true about the actual entrypoint/main functions that *do the thing*...

      In conversation Sunday, 01-Dec-2024 06:46:29 JST permalink
    • Embed this notice
      prozacchiwawa (prozacchiwawa@functional.cafe)'s status on Sunday, 01-Dec-2024 14:29:11 JST prozacchiwawa prozacchiwawa
      in reply to

      @someodd haskell's base type system is pretty expressive even without liquid haskell. sandy maguire's book "thinking in types" really opened my eyes to what kind of computation was achievable at the normal type level in haskell.

      In conversation Sunday, 01-Dec-2024 14:29:11 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.