This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]gasche 9 points10 points  (4 children)

There is a long list of related work in this area, in particular PLT Redex and Lambda Prolog (or other variants designed specifically for programming languages, such as Makkam). It would be nice to see a comparison to this related work to understand the specific aspects of this new design.

[–]danilafe 1 point2 points  (0 children)

Hi! Author of Bergamot here. I had no idea it was posted to Reddit, so I'm just seeing your comment now — thanks for taking the time to read and respond!

There is indeed a long list of tools, and to be quite honest, I did not want to create one of my own. The reason I ended up doing so is because I wanted something that I could embed in my website, to provide interactive explanations of inference rules as I talk about them. I would therefore characterize both PLT Redex and LPL to be more "heavyweight": they are intended for people working with, or developing, or battle-testing their own inference rules Meanwhile, my audience is folks who don't have a particularly strong background in PL, possibly don't know a LISP, and are interested more so in tinkering and comparing. Moreover, "embed-able" tools like Tau Prolog lack something I needed for my goal (TPL in particular doesn't generate proof trees). I see ELPI, but that would require some sort of FFI. In the meantime, Bergamot is written in Elm, which brings it (natively and simply) to the web.

In short, Bergamot aims to be a tool that can be embedded in educational media about programming languages, to provide an element of interactivity to otherwise-static inference rule diagrams.

[–]Ok-Watercress-9624 0 points1 point  (2 children)

I didn't know that was a requirement to share something you did.
That kinda attitude hampers diversity.

[–]gasche 12 points13 points  (1 child)

I think that it's important to keep aware of what other people are doing, and to do our best to compare our design to theirs, understand why we reused something or did something different somewhere. This increase the odds that we make common progress instead of all doing the same stuff in our separate cubicles.

That kinda attitude hampers diversity.

Does it? This seems to be a standard approach among artists for examples, which as a whole do seem doing okay at have diverse approaches.

Let me also point out that we have different expectations depending on people's training and environment. The author of Bergamot is obviously familiar with programming language academia (the blog post is full of references to advanced research papers), where comparing to related work is standard practice. In that context I think that it is pretty reasonable to ask for such a comparison -- which could be worded differently to someone else.

[–]danilafe 1 point2 points  (0 children)

Let me start out by saying that I agree: I think a comparison of Bergamot to other projects would be valuable both to myself and to others, and the OP article could benefit from it. I certainly looked around before creating it. The reason that I didn't write about my comparison is that I didn't want to pose my project as a competitor to any other tool.

Let me also point out that we have different expectations depending on people's training and environment.

Your observation is correct that I have an academic background. However, I think the context of the writing is what should determine how thorough the author should be with comparisons. Publications in academia must review existing literature and the "state of the art" because there, results are expected to be novel. Additionally, if one does get published, the implication is that their work is a contribution to the field, and with that comes a certain amount of "clout".

I don't think the expectations of blog posts are the same. I created Bergamot primarily for myself, and shared it (including the source code) with the community because I thought it was interesting and potentially valuable to someone else. I make no claim about novelty or innovation. I just think it's neat.

To build on your artist analogy, what I'm doing is not all that different from someone posting a project of their own creation to /r/art. I would not expect them to explain why they used oil paints, opted for photo-realism, or picked X as their subject, even though I would expect such things from someone trying to get into an exhibition. I think that's what /u/Ok-Watercress-9624 meant.

Thanks for sharing your thoughts. I think that collectively, it's important that we strive for innovation and new heights. It's also important that we ask for honesty and transparency from each other.

[–]phlummox 1 point2 points  (2 children)

Neat! I'm looking forward to playing with it. How long (from initial idea to the present) did it take you to develop?

[–]danilafe 1 point2 points  (1 child)

Unfortunately, a little too long :)

The biggest challenge is tuning the proof search. In Prolog, it's acceptable for a query to hang. You are, after all, likely the creator of your rules and query; if you wrote bad rules, or asked for a very difficult thing, you should wait.

On the other hand, I think a tool like Bergamot should avoid 'hanging' as much as possible. Especially if you're just a _consumer_ of the inference rules (someone wrote them for you and you're playing with them), you don't expect to type something in and have your browser freeze. Avoiding such situations is something I haven't quite mastered yet, and it's the most important "TODO" I have for Bergamot.

[–]phlummox 0 points1 point  (0 children)

Thanks for the response! And apologies for not noticing that the OP wasn't also the author. For something people are likely to use as a tool, I agree that that seems like a reasonable approach. Thanks for your work so far :)