i'm still working on my project to implement a Processing-like API in Lua/Love2d. I have added a majority (?) of the functions, including a number I never use. Because love2d clears the screen between drawing functions I chose to add in persistence using a canvas buffer system that redraws each frame. Here's an example drawing random rectangles with occasional background screen redraw.
ok, i've gotten the API to a draft state and am pretty happy with what i have. of course, i'm aware that i've done 80% of the work in 20% of the time (or however that's stated) so the tiny details will take days/months/years. but i'm already pretty happy with this pre-alpha. i'm ready to start trying to make little programs and put it through its paces.
i'm still going. i got most (?) or at least a lot of the Processing/p5.js API done. I also modified the love.run() function so that the screen isn't cleared between frames but the matrix transformations are, to get it in line with Processing. I added many functions, cleaned up things, and started testing the functions i implemented. still to come: error handling and general bug fixin'

i wrote a crude pong in L5. maybe i still need a better title for this library of Processing API in Lua with Love2d. (any suggestions?)

(music by Hildegard Von Bingen of course)

ok, i'm stopping for the night. the next things to do are to add typography functions, full mouse functions, and color modes, then I think that will be most of the API complete. I will still need to do bug testing.

Tonight I ran up against a problem I couldn't quite solve. I am using @Alexjgriffith suggestion to modify love2d's love.run() game loop and modified the default loop to not clear the screen between draw calls. Unfortunately, when drawing graphics from events (such as keyPressed(), keyTyped() ) the screen flickers, I think because of double drawing. I tried half a dozen different solutions but never quite found a satisfactory one unfortunately.

since i am stuck on the flickering background color problem i decided to take a break from that. so this afternoon i implemented a toColor() system so that one can input color names in the same variety of ways that p5.js does: using a html color name - it's glorious to use Rebecca Purple, Lawn Green, Dodger Blue, Mintcream isn't it?, as well as R,G,B, or R,G,B,A or grayness or grayness,A. later i will add in some other modes like HSB
added 3 and 6 digit hex color codes as well.

added frameRate() function.

while working on all this, had a bit of a think. i believe my flickering screen problem is a result of me hacking Love2d to work more like processing/p5. in the processing model, the approach is a synchronous model. draw runs once per frame. if too much processing happens, it slows down/frame rate drops. love2d takes the approach of drawing as many times as needed per game loop. logic is separated out into update(), while drawing is rendered in a separate thread, so game logic doesn't block rendering and realtime logic can be processed. In love2d, the emphasis is on realtime game processes.:

@exquisitecorp afaik, unless i’ve misunderstood your post - love2d does not run update and draw on separate threads. in its vanilla configuration, update is run first, draw second. they're both run in the same (blocking) single thread.

i can confirm that via experience - framerate absolutely can tank due to too many update calls. i had some nasty bad code that was checking 100,000,000 coordinates per frame and brought fps to its knees 😅

@vga256 ah ok, thank you for clarifying that.

oh and i've made good progress! fingers crossed, but everything seems to be rendering across draw and events. now i can't seem to get setup to render correctly, but hopefully only a matter of time. need to do more testing but feeling better.

@exquisitecorp woohoo. glad to hear it!

always a drag when progress gets hung up on a single annoying bug

@vga256 got it! i think!