Title
#devlog-together
Konrad Hinsen

Konrad Hinsen

08/17/2022, 11:48 AM
My highly domain-specific FoC project, the Digital Scientific Notation I called Leibniz, is finally in a state where I think others can explore it without being lost immediately: https://github.com/khinsen/leibniz-pharo
11:50 AM
Leibniz is a notation for digital scientific models and methods, but it is not a programming language. It is meant to be used in scientific articles, textbooks, PhD theses etc., with the goal of rendering all the formal parts machine-readable and explorable with computer tools. Those tools remain to be designed and written.
11:51 AM
Its implementation in Glamorous Toolkit may be of interest to some here as well, just as an example of what can be done in that environment.
Kartik Agaram

Kartik Agaram

08/17/2022, 5:54 PM
Your description here sounds tantalizing, but I'm having trouble connecting it up (just by reading) with the description in your link. What parts of this screenshot are your notation? They seem like regular math notation. Or is Leibniz a machine-readable representation of math notation?

https://raw.githubusercontent.com/khinsen/leibniz-pharo/master/screenshot.png

Konrad Hinsen

Konrad Hinsen

08/18/2022, 7:29 AM
Everything shown in blue or magenta is Leibniz code. It looks similar to math notation, and it is meant to be used in the same way: embedded into prose. But it is machine-readable and, more importantly, has precisely defined and useful semantics via equational logic. Another difference is that there is an algorithmic aspect in the form of a term rewriting engine. The idea is that you can express both traditional equations and the specifications and algorithms of purely computational models. It remains to be seen how far this will go.
4:45 AM
Fresh of the press: a conversation with @Tudor Girba about Leibniz and its implementation on top of Glamorous Toolkit:

https://www.youtube.com/watch?v=f10NpsMmbis

t

Tudor Girba

08/24/2022, 5:10 AM
This is some impressive work!
Kartik Agaram

Kartik Agaram

08/29/2022, 4:49 PM
I'm halfway through this video now, and am able to answer my earlier question to my own satisfaction. Leibniz is a markup language like html, markdown or Latex. As we have learned to expect, the markup can be rendered to a prettier form using some sort of rendering engine. In addition, however, the markup language includes affordances for performing side-effect-free computation. For example:
{{2/4}}
will look the same, but:
{{2/4; withNormalForm="yes"}}
will look like
1/2
when rendered. (Ignoring syntax because I don't actually know what I'm talking about.) Very cool!
Konrad Hinsen

Konrad Hinsen

08/30/2022, 6:03 AM
Markup language with side-effect free computation is a good summary for Leibniz from language/semantics point of view.
t

Tudor Girba

08/30/2022, 8:59 AM
That describes what one can do with it, indeed. But what I found more fascinating is the custom tools that help one develop and extend Leibniz itself. What is the name for that? 🙂
Konrad Hinsen

Konrad Hinsen

08/30/2022, 10:01 AM
That was actually my main personal discovery in the process of developing Leibniz. I started out with a first implementation in Racket. I had a Scheme background, and Racket has a lot of support for developing languages, so it seemed like a good choice. And if you consider development tools a separate subject, as most of us do, it is. Implementing my first design of Leibniz in Racket (using Emacs as my IDE) was a good experience overall. But improving on the initial design, iteratively, turned out to be very frustrating. I had two nested edit-compile-run cycles, one for Racket and one for Leibniz, and no other tools than print statements for looking at the internal data structures of my implementation. That was way too cumbersome to handle. When I discovered Pharo (by accident), I immediately saw that a live environment is what I wanted. So I started my second implementation in Pharo, which at that time contained a precursor of today's Glamorous Toolkit that was already very useful. Since then it only got better. My current point of view is: you can't design a language without in parallel developing an IDE for that language. And that becomes an important criterion for choosing a platform.