1. 39

  2. 3

    Neat idea! I like it!

    1. 2

      This reminds me of functional React components. I think the nested and repetitive nature of HTML lends itself well to functional programming.

      1. 1
        let sum = https://raw.githubusercontent.com/Gabriella439/grace/main/prelude/natural/sum.ffg
        in  sum (List/map (\student -> student."Grade") ./students.ffg)

        (Understanding that this part in particular doesn’t yet exist,)

        This reminds me of deno; I think that’s awesome, and hadn’t ever considered importing static data, rather than code, and the URI as a literal in the language is fascinating to think about.

        This also fits really neatly into a model of lab notebook I’ve been thinking about for a long time. something like this embedded in a tiddlywiki, for example, being able to easily import other nodes as data by URI, is incredibly intriguing…

        Kudos!! This is awesome, thank you for sharing!

        1. 4

          And it reminds me of Dhall 😉

          1. 3

            Thank you for pointing me that direction, I hadn’t ever looked into Dhall, thinking it was a config language like TOML is a config language, not realizing what it was!

            The use case I have in mind is some kind of node in a computation graph that’s embedded into a wiki/notebook style application. The zettlekasten stuff that was popular end of last year is really interesting to me, but I’m less interested in finding links between notes than being able to surface computed data.

            eg, imagine a node in Evernote that showed your private gitlab repos, sorted by last commit, and also linked to an internal wiki page on the project; something like Grace autogenerating UI from an expression that can reference data by URI and be total would let that be an internal construction, rather than widgets built with some kind of extension mechanism.

            1. 2

              I hadn’t ever looked into Dhall, thinking it was a config language like TOML is a config language, not realizing what it was!

              Would you mind sharing your insight?

              1. 3


                I had first seen Dhall mentioned a couple years ago around the sime time that people were arguing about using TOML vs. YAML, and that put me into a place where I had conflated the two, but they’re very different beasts.

                Where TOML is a “file format”, like YAML or JSON, Dhall (and Grace) are functional programming languages.

                The confusion on my part is that because they are pure, and total, they cannot be general: they (purposefully) cannot represent programs that run indefinitely without halting, nor programs that have arbitrary side-effects.

                But for describing data transformations (and configuration, which is the Dhall raison d’être), it’s perfect; you get to express data transforms in a language that’s not just copy/paste, with type checking, and the host program gets verifiably correct transformed data.

                In the context of a wiki-style computation graph, if you know that the computation in a node is pure and total, you can re-evaluate portions of the graph arbitrarily when dependencies change, without worrying about non-idempotent side-effects.

                1. 2

                  Thank you for elaborating :)

            2. 3

              The author created Dhall, which would explain some of the similarities!