Thank you for swish and clpBNR!

Hello,
I would like to put a word of thanks to both @jan and @ridgeworks for integrating clpBNR into swish.
I only noticed the new integration yesterday and so I translated my blog post into a swish notebook to test it/showcase it: Triangle.swinb.

I couldn’t find a way to do an automatic translation so I manually copy pasted the markdown, code and queries.
I even copy pasted the svg for the geometry drawing and it just worked ^^
Although, it would be nice if there were a way to draw geometrical shapes like we can do charts with c3.js ?

4 Likes

Very nice!

If you download a notebook, you’ll see it is quite simple HTML. You can generate that with other tools and upload it as a notebook.

If you know a good JavaScript library, it isn’t too hard to make it usable. Note that you can generate HTML and SVG using Prolog and get it rendered. Might be a bit clumsy …

How would one upload a notebook to swish ?

I used JSXGraph to make my visualisation for the blog. However, I don’t know enough of web dev to know if it will be easy to integrate or not.

I’m starting to really want to make a svg drawing library for prolog, especially one that can handle manipulating d path strings. But that seems like a very difficult endeavour.
Anyone else know of something already existing or is interested to make one ?

That is a very well hidden feature, thanks to my (not so) great UX talent :slight_smile:

  • Create a Notebook
  • Use the “+” at the top button bar to insert a cell.
  • See the link “more” and click it
  • Now you can upload a notebook. Note that the uploaded notebook is in fact inserted into the notebook, so you can use this to combine notebooks.

I’ll leave it to someone motivated. Anyone interested, install a local copy and study the C3 rendering plugin or one of the other rendering plugins.

It shouldn’t be too hard to generate svg based on the html output tutorial

Thanks, I’ve always wondered how this could be done. Now, is there a way to delete an existing notebook?

The storage is GIT inspired. That means nothing is ever deleted and everything is linked using secure hashes. You can of course make it empty, possibly leaving a link to its replacement. Anyone however can open the history and ask for an older version. If you are the owner and logged on, you can also make it private, which means nobody can find it unless they know the name.

Fair enough; just wanted to avoid building up clutter. Guess I’ll create a private “temp” notebook which can be re-used for various experiments.

Love the post (as a fan of geometry and Prolog).

“Stay tune for the next blog post of this subject”

Where/how do I stay tuned?

For some of my own Prolog → SVG diagramming, I started with the following and modified it for my particular needs:

On our list for, well, realistically, next year

Oh, interesting!

It seems I have an atom feed on my blog page.

Anyway, I’ll post any update here.

Thanks ! that was an interesting read.