Changelog
- Version 1.26 (unreleased, commit 975c22f3cc, 2026-11-30)
-
Added
- Queries can now read from the terminal (read/1, get_code/1, etc.), in the top level and in the cells of documents: the query waits for the line typed by the user, and an "End of file" button ends the input.
- Documents opened in the playground show their formulas (they were left out), typeset by MathJax in Fira Math as in lpdoc's html; MathJax is loaded the first time a document has one. Their lines with an @hfill are laid out as in lpdoc's html too.
- Collaborative editing: a collaboration button (👥) starts or joins a shared session by its ID (green when connected, orange while connecting; press again to disconnect); Share then gives a link to the session, and a ?session= URL parameter joins it. Code in a session is not autosaved locally.
- Preliminary support for the LPTP theorem prover (Ciao port), based on its Emacs mode: proof checking and interaction commands, with menu and key bindings, also in active logic documents. Open it with playground/lptp.html.
- "Open from URL" entry in the File menu; changing the #... part of the URL reloads the code.
- Playground URLs can carry the file name of the code (filename=, also the older file=): it is used by "Save locally", as module name when the code declares none, and to pick the mode (a .md name opens as an active logic document). Share and "Load in playground" send it too, and ext=md and ext=.md are both accepted.
- Documents: cells with the same filename= make up one file, loaded, tested and opened in the playground as a whole; a cell that declares a module starts a new version of the file. A cell may name its module in its module declaration, and other cells and queries can refer to it by that name.
- Code block attributes such as ciao {runnable filename=append.pl} are parsed as words and Key=Value options; new language tags ciao {runnable} (ciao_runnable is still accepted) and js {exec} for JavaScript cells.
- prologrun.sty (LaTeX package for documents with links that run code in the playground) greatly extended: configurable run buttons, lstlisting-style options, file-based commands (\prologinput, \ciaoinput, ...), runlink, ext= and filename options, a faster link encoder; new tutorial (prologrun_tutorial.tex) and a Beamer slide example with runnable code and an embedded notebook.
- An example document (ald_cells_example.md) with all kinds of runnable cells.
- Test timeouts: a test that runs longer than its timeout(N) (10 s by default) is stopped and reported as timed out, and the remaining tests are run.
- Documents: the up and down arrows (C-p and C-n with the Emacs keys) go on from the first or last line of a cell to the cell above or below that is shown (also in query cells, through their answers).
- Documents: the code between %! \begin{hide} and %! \end{hide} at the start or at the end of a code cell is loaded but not shown (the opposite of focus).
- Documents: a code cell with nothing to show (all its code hidden, or an empty focus block) is not shown, not even as an empty editor, and its code is loaded with the page, as with autoload.
- Top level: M-p and M-n go through the previous queries, as in Emacs (also Option-n on a Mac, where it starts a tilde, and, with the Emacs keys, ESC p and ESC n).
- Documents: a mini playground has the debug button of the playground if its block asks for it, as in ciao {runnable debug}. It turns source debugging of its code on and off: the goal being run is marked in the editor, and its toplevel has the buttons to creep, leap, skip, retry or fail.
- The page says what Ciao is loading when it takes a while (as it starts, or CiaoPP on the first analysis), in a faint box at the bottom left, as MathJax 2 did; a mini playground says it in its toplevel too while it starts (it showed {...}).
- Errors that only the console of the browser showed are said in that box too, until clicked: an example that could not be opened, a link that Share could not copy, and MathJax not loaded.
- The box also says "Loading page components …" before Ciao: while lpdoc's lpdoc.js loads the code of the playground (in documents made with this lpdoc, and in the playground), and while the playground loads the editor and makes its cells.
- When the box has said for 5 s what is loading, it adds "(this can take a while on slow connections)", as the old cover of the playground did.
- Playground URLs can provide a theme (theme=light, dark or system), without changing the one chosen by the reader. "Load in playground" in a document passes on the theme chosen there, or the one given by the block (theme=); Share leaves it out. Also prologrun.sty (version 2.6) takes a theme= option.
Changed
- Top level: with the Emacs keys, the arrows and C-p and C-n move the cursor, as in Emacs (they went through the previous queries, which M-p and M-n do now).
- Formulas are typeset by MathJax 4 (was 3), in the sans-serif font Fira Math, as in lpdoc's html (mathjax@4 and @mathjax/mathjax-fira-font@4 from npm).
- Cell buttons follow the cell contents: a cell without tests shows a "play" mark and "Load"; a cell with tests (now also a plain code block) shows the question mark and "Run tests and load".
- Printing from the playground switches to presentation mode, and warns when DevTools is open (the PDF page width is then wrong).
- Generated URLs (Share, "Load in playground") are fully percent-encoded, so they can be pasted in Markdown links; "Load in playground" keeps the mode of the block and sends a whole document for non-.pl blocks.
- Faster loading of documents: editors are created first and cells are initialized afterwards.
- Manual: presentation mode, slides, new icons, LPTP, collaboration, # in URLs, and the use of prologrun.sty.
- Mini playgrounds in documents have the Examples menu (which replaces their code with one of the playground's examples) only if their block asks for it, as in ciao {runnable examples}; the front page of the website does.
- Documents: a mini playground starts its Ciao process when the page loads only if it is in view (as on the front page of the website); the others start theirs when first used (clicked, or given the focus), and until then their toplevel says so. At most three run at once: to start one more, the one used least recently that would lose nothing (it is not running a query, waiting for more solutions, or debugging) is stopped, saying so in its toplevel, and it starts again, loading its code, when used.
- The playground no longer has a cover that says "Loading ... This can take a few minutes on slow connections.", which has not been shown since lpdoc.js loads its code: the box at the bottom left says what is loading. multi.html no longer stops, before setting the theme, at the call that hid it.
- The local server ciao-serve-mt lets the browser keep the files it serves, asking each time whether they changed (no-cache, with an ETag), rather than forbidding it (no-store): unchanged files are not downloaded again on each load (some 20 MB a page), and a rebuilt one is still seen at once.
Fixed
- When Ciao could not be loaded (e.g., a bundle not found on the server), the page waited for it for ever, saying nothing (the worker did not send its errors back). It now says what could not be loaded and why, in the box at the bottom left and in the toplevel, which gets a new prompt, and tries again when used: a mini playground, or a command that needs a bundle (as CiaoPP for an analysis).
- Cells were marked as passed when loading, testing, documenting or analyzing raised an exception (e.g., a misspelled package); they are now marked as failed and show the message.
- Errors and warnings in cells that show only part of the program (focused code, exercises) highlighted the wrong lines; messages now use the editor line numbers, or say "hidden code".
- Code shown in an exercise could disappear when joined to the preamble behind a comment.
- A ?- anywhere in a block (e.g., in a comment) turned it into a query cell; only blocks that start with ?- are queries now.
- Queries such as use_module(library(lists)) in query cells failed without an answer.
- Cells without a module declaration gave a "Source used as module without module declaration" error.
- Module names are now correctly quoted and read in any legal atom form; file and module names are kept apart.
- Share links with a code already in the URL, or made after starting a collaboration on a document loaded from a link; unknown extensions in URLs are read as code.
- Printing from the playground, switching to slides twice, opening a local file, deprecated #... links, and the mode not being saved when it changed.
- After running the tests of a cell, a query on its code could fail with an existence error (e.g., an autorun query below it).
- With the Emacs keys on Windows and GNU/Linux, C-f, C-b, C-n, C-p, C-a, C-e and C-d did not move or delete as in Emacs (they were Monaco's own, only on a Mac); C-n is still kept by the browser there.
- Documents with many cells: typing in a cell of a file in several parts (blocks with the same filename=) took about a second per key in a document with some 500 editors, since the lines of all the cells were numbered again, each a slow change of its Monaco options. Now only the parts after it are, when their first line changes.
- With the Emacs keys, C-y did not yank text copied elsewhere (e.g., in another window), only kills made in the playground; as in Emacs, it now yanks that text first (if the browser lets the clipboard be read), and M-y then gives the kills before it. The clipboard is read only if the page lost the focus, or something was copied in it, since it was last read or written: Chrome asked for permission at every C-y in a document opened as a file.
- A cell with more than one focus block (or hint, solution, etc.) used the last one, while lpdoc's pdf and info used the first; both use the first one now.
- Documents: of several mini playgrounds on a page (blocks with %! \begin{miniplayground}), only the first one started; the others did not load their code. Each mini playground now has a Ciao process of its own, as the playground does, so that its debugger, aborts and code do not reach the other cells of the page.
- Documents: the code of a mini playground before its %! \begin{miniplayground} and after its %! \end{miniplayground} was dropped; it is now loaded but not shown, as in the other cells. Messages and the debugger mark the lines of the editor, and a message about the hidden code is marked as one with no line, saying so. Code put in the editor from a menu (e.g., an example) replaces the hidden code too.
- Version 1.25 (2025/6/21)
-
Added
- Documents (.md ALDs) in the examples menu; examples menu with categories and links to help; new examples (CiaoPP, fsyntax, slides, core/examples, core/library/sr); a pointer to the 99 Prolog problems.
- A button that shows the current mode (.pl or .md) and toggles it; the buttons shown depend on the mode; .lpdoc files can be uploaded.
Improved
- Buttons: a File button (open and save); debug, preview document, presentation mode and on-the-fly mode as buttons (the on-the-fly button turns red when on).
- Splash for new code and new documents; parsing of errors and warnings; the manual covers ALDs and the new functionality.
- wasm32p64 is the default engine.
Fixed
- Only the first line of multi-line errors was shown.
- Escape sequences in strings and quoted atoms.
- Version 1.24 (2024/10/13)
-
Added
- Support for multiple file types. The playground can edit both markdown/lpdoc (documentation) and code.
- Added "presentation mode" (hides all editor components)
- Added "slideshow mode" (presents sections as slides)
- Share links include both contents and file type.
- Register language keywords ciao-prolog, ciao, ciao_runnable (for markdown coloring).
- New URL fetch method for local URIs relative to build/site (requires ciao-serve-mt; SERVER/playground/#/tmp/foo.md points to CIAOROOT/build/site/tmp/foo.md)
- CiaoPP Flags Interactive Menu.
Improved
- Load button for ALDs now generates documentation.
- Better implementation of nested playgrounds.
- Support URL versioning suffix.
Fixed
- Fixed M-d bindings as deleteWordRight (it was actually overwriting C-d)
- Do not reload ALD code on abort, reset status to unknown.
- Fix non-monotonic slideshow scaling (use thin scrollbar and scale ignoring scrollbar width, see commit message for details).
- Use CSS zoom instead of transform (zoom is not standard but widely supported, it computes layout correctly).
- Do not capture arrow keys in slideshow navigation when focusing some editable component.
- Do not save persistent storage in runnables (ALD).
- Version 1.23 (2024/3/4)
-
Added
- Add debugger support.
- Menu buttons for analysis (w/ and w/o output).
- A simple on-the-fly button under the More menu.
Improved
- Towards relocatable URL for playgrounds. The auxiliary lpdoc.js loaded in HTML backend of LPdoc is extended to automatically load the playground when needed. It will attept several locations: local URL, and then https://ciao-lang.org. Note that due to CORS limitations, serving from file:/// is not fully working.
- Build and distribute ciaopp library cache.
- More flexible installation of custom playgrounds.
- Updated documentation.
- Upgraded to Monaco Editor 0.38.
- Recolor port in toplevel while debugging.
- Patterns for warning/error parsing.
Fixed
- Use ?code= in URL for "load in playground" links from active logic documents.
- Fixed error location from CiaoPP.
- Workaround new addCommand behavior in Monaco >=0.32 ()
- Hide previous analysis output in acheck.
- Allow CORS in local server.
- Fix syntax highlight for =:=.
- Trim results of exfilter (in active logic documents).
- Version 1.22 (2023/4/27)
-
Added
- User's manual (including use of LPdoc and exfilter, examples with links to playground in LaTeX, etc.)
Fixed
- No need to use the "triple backtick with spaces" trick.
- Fix bug when asking for more solutions and not typing ; nor just Enter.
- Fixed bug with the file name when downloading the code from the playground.
- build.sh: stop if emcc is not found.
- Fix code sharing links (encodeURIComponent, ?code=... instead of URL hash)
- Update all examples to new playground links.
Improved
- Appearance:
- Change layout when the screen is too small for two columns.
- Align the top and bottom buttons, fixed the cropped logo, cursor hovering over buttons.
- Rearrange UI: removed error container, moved Load into toplevel button to the top and added an Abort query button.
- Added beta symbol to title.
- Slightly better code highlight in playground preview.
- Highlight analysis results and messages (for exfilter).
- Interaction:
- Add classic predicates to toplevel when loading.
- Notify when the toplevel is ready to use (all dependencies have been loaded).
- Add the abort query functionality (with button and C-c): terminate current worker and restart it.
- Display Abort button only when a query is running.
- Add timeout for queries.
- Redirected error messages to the toplevel.
- Add "Run tests in module" and "Debug source" buttons and functionalities.
- On-the-fly button
- Editing:
- Add the Emacs key binding C-c l to load buffer into toplevel.
- Add ability to resize the editors with a split panel (just like in the CiaoPP Playground).
- Version 0.0#1 (2022/7/4)
- Initial release.