Why ipso?

3 Aug, 2022

This post is for everyone who learns about ipso and wonders, “Why should I use this?”

The short answer? You shouldn’t, unless you want to.

ipso is very much a personal project. I created it because I wanted a scripting language that I’d enjoy using. Something that would make writing glue code and throwaway scripts feel good to me.

It follows that any attempts by me to convince or persuade you to use this language would be in poor taste. Just as I wouldn’t argue that you should start liking Meshuggah or pineapple on pizza, I won’t argue that you should value what ipso has to offer. To each their own.

My role as the language designer is to lay out my values and preferences and how they have influenced the language, so that you can easily decide whether or not it’s for you.

The two main forces driving my decisions in ipso are my senses of correctness and convenience. To satisfy my need for correctness, the language has static types and achieves equational reasoning through explicit effects1 with computation expressions2. In service of convenience, it has string interpolation3 and command literals4, and aims to have a comprehensive standard library5. Some features exist for both ends, such as anonymous records6 and variants7, and type classes8.

Finally, I’ll leave you with some ipso code for a CI script I wrote. Hopefully the features I’ve described together with the code below give you a sense of whether or not you’d like to use this language.

#! /usr/bin/env ipso

main : IO ()
main =
    let versionVar = "GITHUB_REF_NAME"
    let versionFile = "ipso-cli/src/version.rs"

    bind mVersionInGit <- env.getvar versionVar
    case mVersionInGit of
      None x ->
          println "error: $versionVar not set"
      Some versionInGit ->
          bind versionLine <- file.read versionFile
          # extract `version` from `pub const VERSION: &str = "version";`
          let versionInRust = 
              |> string.split ' '
              |> array.index 5
              |> string.split '"'
              |> array.index 1
          println "$versionVar version: $versionInGit"
          println "$versionFile version: $versionInRust"
          if versionInGit == versionInRust
                println "success: versions match"
                println "error: version mismatch"

  1. https://ipso.dev/docs/reference.html#io↩︎

  2. https://ipso.dev/docs/reference.html#computation-expressions↩︎

  3. https://ipso.dev/docs/reference.html#interpolation-1↩︎

  4. https://ipso.dev/docs/reference.html#command-literals↩︎

  5. https://ipso.dev/docs/reference.html#standard-library↩︎

  6. https://ipso.dev/docs/reference.html#records-1↩︎

  7. https://ipso.dev/docs/reference.html#variants-1↩︎

  8. https://ipso.dev/docs/reference.html#type-classes↩︎