Emilio, hi,

okay, down to business!

I have lots of questions, I can't seem to get going with this. To begin with I'm using 'jscoq_worker.js' and connecting to it like so:

class JsCoq {
  constructor(controller) {
    var worker = new Worker('scripts/jscoq_worker.js'); worker.onmessage= 
function(messageEvent) {
      this.onMessage(messageEvent); worker.onmessage= this.onMessage; 
}.bind(this); }

  onMessage(messageEvent) {
    var messageData = messageEvent.data, messageSummary = messageData[0], /// 
messageContents = messageData[1].contents, /// messageContent = 
messageContents.join(' '), message = messageSummary + ': ' + messageContent; 
console.jsCoq(message); }
}

This seems to work fine.

I get two 'feedback' messages, 'ProcessingIn Master' and then 'Processing', not sure what these mean.

After this I'm stumped.

I see nothing in the jsCoq documentation about workers anymore. I'm guessing this interface has been deprecated? The CoqManager interface seems too high level for my needs, taking as it does a list of textarea identifiers.

I then recalled that you mentioned that the Se(xp) protocol would be coming along soon, so I followed the link. I then read:

If you are a developer, you can use SerAPI in 3 different ways:

 *

   As aJavaScript Worker
   
<https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers>from
   your web app. In this model, you communicate with SerAPI using the
   typical|onmessage/postMessage|worker API. Ready-to-use builds are
   typically foundhere
   <https://github.com/ejgallego/jscoq-builds/tree/serapi>, we provide
   an example REPL at:

   https://x80.org/rhino-hawk

This looks hopeful, since it's using a web worker, however I can't seem to get anywhere with either the ready-to-use builds or the online example. At a glance, neither seems to be what I need.

How do I get started?

Kind regards,

James
_______________________________________________
Jscoq mailing list
Jscoq@x80.org
https://x80.org/cgi-bin/mailman/listinfo/jscoq

Reply via email to