Re:A card game implemented in APL
by alexcweiner on Sunday August 16, 2015 @06:00PM
(#10070416)
I think so,
It would be easy to make bitmap data with APL. What is the output of the "draw" being processed by, (or where)? From there, I think it would be easy to see where to wedge in APL.
Re:A card game implemented in APL
by RodgerTheGreat on Sunday August 16, 2015 @06:56PM
(#10070579)
In iKe's case, the output of draw is used by JavaScript to render to an HTML5 Canvas tag.
https://github.com/JohnEarnest/ok/blob/gh-pages/ike/ike.html...
"draw" specifically returns a list of tuples which each consist of a position (or a vector of positions), a palette of colors and then a single pixel, a vector of pixels or a matrix of pixels. (Call it a rank 0, 1 or 2 bitmap, if you like.)
iKe is designed to be similar in usage both to the kOS "Z" windowing library (details are unknown, but there is one example program available to the public: http://kparc.com/edit.k) and Processing, a Java-based environment aimed at beginners and artists.
I'm suggesting that other APLs could be equipped with a similar setup to what iKe provides- export an APL module with some set of event handlers and at least a definition of a "draw" method, and then use some cross-platform UI toolkit to feed the APL events and render its results for the outside world.
Does that make sense?