Closed triska closed 2 years ago
Currently the playground naively loops through the results, possibly blocking forever on infinite queries. Adding some buttons to control the iteration like SWISH should solve this problem. We can support this now that https://github.com/trealla-prolog/trealla/issues/46 is implemented.
I added a simple query iterator kind of like SWISH's. I'll make it look nicer and add some hotkeys later. As an extremely simple failsafe, pressing "all" will pause after 10000 results (returning control to the user, but not killing the query). Should probably make this a timer instead.
For example, when I query:
I get no answer at all.
Note that many interesting programs have infinitely—or very many—solutions, as is the case in many combinatorial tasks.