Fun fact: my hobby is to go into random code I've written in Sublime Text and change the syntax highlighting to different languages just to see the pretty colors :D
@Cowsquack P5 is the only given object by the library. P5.G is the main PGraphics object (the equivalent of the predefined variable g in Processing), on which you draw stuff (because I didn't want to bloat P5 with graphics things)
@Quintec Don't be sad. dzaima and I just have more experience. But look, dzaima is outgolfing me, and I have more than an order of magnitude more experience. You'll get there soon enough.
@Quintec Sure. I was just going for an iterative (!) solution.
i guess I don't know what the structure of an app using the htmlrenderer would look like. As in, how am I calling javascript on the canvas from APL? I don't really follow
am I writing javascript? or am I writing an API for APL that does the JS? or do I write the js and call js directly?
I still don't understand how I'm going to interact. for example: var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.moveTo(0, 0); ctx.lineTo(200, 100); ctx.stroke();
for more on HTMLRenderer, here's a presentation from last year's Dyalog User Meeting (youtube.com/watch?v=c9CK0m_LuBk)... I'll be doing a new one as well in a week
the HTML attribute in HTMLRenderer is simple a character vector with the content for the page. so, a lot of the work I've been doing is to make it easy to generate that content from APL
I'll be introducing a framework we call DUI so you can do things like mypage←⎕NEW Page (mypage.Add _.h1 'Hello World').On 'click' 'mycallback' which sets up an event handler on the <h1> element which will call back to an APL function named mycallback
the code is similar to that MiServer uses... if you look at miserver.dyalog.com, there are a number of examples. DUI is a framework that will include MiServer and HTMLRenderer so you can write the same code to run locally or over the net
I need to get back to prep for my presentations... I'll have more time after the user meeting to answer questions in greater depth.