This demo illustrates packaging CHAT80 as a .qlf file and using it from JavaScript. CHAT80 is compiled using the command below. This compiles all CHAT80 files into a single SWI-Prolog .qlf file. This file is made available on the server.
?- qcompile('chat80.pl', [include(user)]).
This demo does as much as possible of the processing in JavaScript, as opposed to the CBG demo which does all the DOM manipulation and event processing in Prolog. We merely provide the two alternatives without claiming one is better.