lee@exquisitecorp@merveilles.town

working on documentation website and a logo for L5. could this be it?

i am trying out mkdocs with the material theme. pretty mainstream i know. typical problem: was easy to get started and easy to render pages but customizing it is a pain since you have to figure out how they've done it and override their choices.

L5 logo in stylized blobs
lee@exquisitecorp@merveilles.town

i made a batch of reference pages today. it's slow going because it lets me do bug testing and for each one i'm drafting the page by hand, converting processing or p5.js's reference examples to L5, then running the example code, screenshotting, converting to webp, formatting, etc. My friend told me "don't you have a student that can do that for you?" but i don't really work that way, and i don't have students to work on my projects! we don't have grad students at my school, for one. maybe i can write some automated script to run through the processing or p5 examples, do a brute force conversion to L5 and dump them into a templated page that i could then go through and clean up. it might make things faster. but writing that script could take me a couple hours.

I'm getting closer to being ready to build the website for the lang and think i'll likely use ye olde GitHub because of the pages feature, easy to collaborate, accept issues, even from beginners, and that's where Processing and p5.js are. But if I want to make a new organization the name L5 is already taken. So what to do: L5-Lua? L5-processing? L5-sketch? something else?

lee@exquisitecorp@merveilles.town

while i feel pretty great about my progress, i can see that hand retyping out the reference pages (and later the example pages, and my own p5.js code saved from the past decade of teaching) makes no sense.

And i don't have time/money/energy to recruit a volunteer or student so i reached for bash and sed and have a pretty good converter in less than 100 lines of code! i've tested it on a half dozen p5.js scripts so far and all have come out well. added a warning on the output of things to check.

gist.github.com/lee2sman/f84e0

lee@exquisitecorp@merveilles.town

today i moved apartments so not a ton of coding. moving was half done by subway and half done by bike.

in the evening was the Creative Code Berlin meetup. before heading out i sent the latest L5 to Dan to check on his Mac. The horror, error! I could'nt understand it. (solution later...)

At the Creative Code Stammtisch i showed my work on L5 and other projects, and mentioned i need to test on Mac/PC hoping someone would say, here's my old Mac for testing purposes! Alas.

Presentation was fun and I got some good questions, including about later adding a 3d library. Maybe!

Back home at 11:30 and decided to see if i could figure out the Mac problem Dan had earlier. Ohoho: it seems that between Lua 5.1 and 5.2 they switched from unpack to table.unpack, however, Love uses LuaJIt and it might be the mac one compiles a different version of Lua?

Hmm, what to do about not having a Mac for testing. And Dan is 6 hours behind me, out with his family at dinner.

Well, I do have an iPad mini. And there is a Love2d Studio program. After I converted all table.unpack to unpack globally it solved that error. But now I get a bug that seems to result from shader code not working the same on iOS/Mac as on Linux. So I axed the shader code section temporarily on iOS (only used in my filters) and then I was able to get my sample programs to run. Phew, if not a total solution i'm at least glad things compile and work. I'll have to look into how to write shaders differently, or else have a mac and pc and linux version of the library. hmmmm.

lee@exquisitecorp@merveilles.town

this weekend was more social than coding but i did find a little time to do some work. the positive was that i solved one of the cross-platform bugs, and it was way simpler than i had feared. The other one seems to be a difference between how shaders are written on Linux vs Mac (and probably PC?) due to different renderers I think? I've not really delved into shaders much previously because i thought it didn't interest me, but since it's useful here i'm spending some time trying to understand at least the basics. i need to rewrite some of the shaders so they work on mac but i feel like i'm monkey-patching everything all the time. i am still "in-progress" on this but think i'll get it. honestly, so far the shaders are only used for filter() which is only a single function, but it's so very useful (threshold, grayscale, invert colors, blur) that i want to get it to work.

On the domain side, i purchased L5lua.org though not plopped anything down yet. i wanna try to get the reference done this week, then soft-launch, then add in more examples, tutorials and maybe even a video intro. I particularly think a video for "how to install" could be useful as i think that's the hardest part of getting started for non-command line users.

lee@exquisitecorp@merveilles.town

Feeling good: Mac bugs seem to be squashed now too, so the L5 library is cross-platform again.

I am going to transition back to continuing work on the Reference pages trying to finish up in the next week so that the L5 site can be ready to soft-launch, and then I can do a first round of testing L5 with friends.

I will try to devise a crazy bash script tomorrow that uses my p5.js -> to L5 bash script to convert the hundreds of reference pages examples and then test and modify them.

lee@exquisitecorp@merveilles.town

Somehow almost 2 weeks have gone by. Well, took a break from writing code (mostly) for the week since I had a friend in town and a series of concerts and such, and i started German classes last week, but that's no excuse!

After meeting with Stef and Raphael Friday to talk Processing we talked L5 too. I showed them my prototype and asked some questions.

Haha, they confirmed that blur is not gaussian blur as described on the reference but is exponential blur. And for example the perlin noise is actually Value Noise but mis-labeled and they may switch to Perlin or Simplex (which is what L5 is using due to its implementation in Love2d). They showed some tricks for automating converting the p5 reference pages from mdx (React) to my simple Markdown without frontmatter. I re-worked on this pipeline at home tonight and had an initial success converting them! Phew, the idea is to cut out a large time sink. I combined this with my bash script that converts p5.js code to L5 code. Finally, i worked on a script to screenshot all the example code and place in an assets directory, matching the reference page, but this will need some more work and need to be done after completing migrating p5 reference pages to L5 and removing any unused pages (and WEBGL examples). Excited to get back into this.

lee@exquisitecorp@merveilles.town

Ok, Using the brute force node script to convert p5.js's reference website (in react-markdown .mdx files with frontmatter) to simple markdown, and then using my sed/bash-script to convert the p5 reference examples to L5 code.

I'm doing this while watching the August WordHack event streaming on Twitch.

Ah, I just remembered Kit told me the p5js reference is also available as a json file. hmmmm. well, i already have my brute force method and seems to work for now to get my own reference pages started. i converted 105 pages that i hadn't written yet.

my next step will be to try to get a script to automate taking screenshots of running reference code examples with scrot, and saving them correctly to the assets folder with the right name and number.

lee@exquisitecorp@merveilles.town

and here's an example page from that process:

I did not write this page. It's a port of the p5.js "movedY" reference page here: p5js.org/reference/p5/movedY/

As with all of the other 105 pages, this page is originally in react-markdown, ported with my script to markdown. And the reference example code is converted from p5.js to L5 code. But I still need to have an image screenshot generated and review (and potentially edit) and text for things that are changed or different.

A L5 in-progress reference page for movedY() with a description and Examples with code example below
lee@exquisitecorp@merveilles.town

Ok, so i'm now at 126 reference pages ported in a first pass. One strange thing is that each of these pages need to be added to the mkdocs.yml in the nav section manually if i want them to appear in the pop-up menu (i do!) so I'll have to go through that later and manually add them in the correct order i guess. In any case, it's bedtime now. And I'm going to unfortunately miss the second half of Wordhack streaming in NYC but i think i can watch it on replay tomorrow on youtube.

lee@exquisitecorp@merveilles.town

back to L5 again. Did a rapid 10print clone tonight. Discovered a bug that the screen width, height global vars aren't set when using fullscreen or default screen so i fixed that bug. Had a hard crash tonight as well for the first time in the language. (i think was trying to draw too small boxes/divide by zero problem)

classic 10print maze on right, implemented in code written in L5 on the left
lee@exquisitecorp@merveilles.town

almost a month has passed and i am finishing up some other work this week so have time to get back into this.

on a whim i decided to write a turtle graphics library in L5 tonight and it was pretty fast and fun.

by the way, i am using the "Studies" approach to working that I think I gained from working in the Lines / Monome community and specifically the Teletype Studies. in this approach, you start using the tool/instrument from basics, creating a variety of projects and little experiments along the way. it's a way to learn the tool, like Drawtober or "everydays". (feel free to pipe in if you think i'm describing this incorrectly!)

My previous "Puzzlescript Studies" can be found here for example:
leetusman.com/puzzlescript-stu

My work on "L5 studies" is a way for me to both bug test as well as find its affordances and limitations, but thankfully, since it's an implementation of the Processing language API, it's very front of mind to me.

screenshot of code in L5 on the left, in the terminal, and the graphics output of a turtle graphics library is on the right, looking like classic green triangle with a twisty random trail of lines behind
lee@exquisitecorp@merveilles.town

In doing "L5 Studies" tonight I made a simple reimplementation of my posterer generator. The idea is it grabs a folder of images then generates 1 up, 2 up, 4 up, overlaid, etc layouts procedurally. In that process I realized I was missing the int() function from L5. How had I missed that from the Processing API? I added it, which wasn't quite as easy as leveraging the math.tointeger() function since that's been added in Lua 5.4 but Love2d uses an earlier version.

Next I finished the posterer program and now I'm ready for bed.

A L5 program on the left showing the makePoster() function with a generated layout of digital minimal amish bars quilt overlaid on the Threelo hollowed out white dice with some scattered dollars on a sheet.
lee@exquisitecorp@merveilles.town

tonight was open studios at my residency. I have a work that's currently in an exhibit in NY that I had coded in p5.js that I spent some time porting to L5 last month. I had forgot about the L5 port and was cueing up the p5 piece and getting frustrated that i'd have to use a web browser-run a server-go fullscreen-reload again to get right dims - etc, and then just remembered i had started the L5 port. Well I opened the L5 project and ran it and it looked good. So I just exhibited that, and so this was the first L5 project to be exhibited/shown publicly, and that felt good. It ran the whole day starting around 4pm running until midnight, and I never once had to worry about browser memory issues or crashes or reloading or anything like that. Kind of amazing. Just goes to show it's up to the task it was designed for, to run fast, easy, and with minimal resources.

lee@exquisitecorp@merveilles.town

While doing L5 Studies tonight I wanted to draw to an offscreen buffer. The reason for this is because I wanted to draw freehand but have the underlying background color change randomly only once each time the mouse is pressed. To do this requires allowing continuous drawing on an offscreen buffer that then gets applied on top of the background. This meant it was time to implement offscreen buffers in the L5 library, so I created the createGraphics() function (that's what it's called in Processing API).

Added and tested. In this example I created a drawing program that lets me draw with photographs. The background only changes when the mouse is pressed down, but the drawn photos are persistent due to...the new createGraphics() function.

#L5 #L5studies

L5 code on the left showing an example of using createGraphics to create an offscreen buffer. On the right is a canvas with drawing done by drawing with photos.
lee@exquisitecorp@merveilles.town

For my L5 Studies tonight I took on a bit of a challenge to make a collection of microgames in the style of beloved Warioware D.I.Y. I was looking earlier today to see if such a thing existed for Playdate. It seems like it should exist, no?! There was evidently a microgames jam with that idea in mind.

In any case, for my L5 programming tonight i ended up making some confused hacker mini game system with 3 different games. it's 'complete' in the sense that you can play it. it took me a couple hours and is a couple hundred lines of sloppy improvised coding. i've been using my own reference pages from the as-yet-unpublished L5 reference docs website (they still need work, more pages and polishing before going live), which has been helpful.

anyway, here's some gameplay of my silly microgames.

lee@exquisitecorp@merveilles.town

some work on L5 tonight.

i updated blur filter shader code from gaussian to exponential and dialed in some good defaults. now it more closely lines up with processing/p5.js.

i also started building out a table of processing family langs, inspired by the uzulangs page uzu.lurk.org/

lastly i tried some initial work to fix my setup / load system but didn’t get to a solution yet. essentially i am currently running setup twice, the first time to grab the set global vars like width and height among other things, the second time to run any graphics code. this is a modification of love’s library which normally only allows graphics code in draw. the problem is that running setup twice can cause issues.

i tried setting default sizing that dynamically changes when draw runs the first time but for example this won’t work for fullscreen programs. i will have to step through my modified love.run() to better understand exactly how and where various globals need to be set before graphics draw. there must be a simple solution but i can’t seem to get it yet.

불러오는 중…

lee@exquisitecorp@merveilles.town

Tonight in L5 studies (which i began working on AFTER I was already supposed to be asleep), I coded a simple toothbrush timer. It shows a moon or sun smiling depending on time of day, and a rotating toothbrush. Every 30 seconds the toothbrush moves to a different position to remind you to move to a different quadrant of your teeth. When you're done, it just says "Donezo" but maybe it should stick out its tongue? dunno. I need to go to bed or else I'd have the animation be smarter (toothbrush motion, and more precisely moving through the quadrants. maybe i'll finish that part tomorrow).

Anyway, this was a good task because it reminded me I should add hour() minute() and second() functions (trivially easy in Lua).

#L5 #L5studies

Code on the left and a moon smiling with toothbrush on right. 4 quadrants left.
lee@exquisitecorp@merveilles.town

Also, earlier in the night I went out with Fletcher and Grayson, who both wanted to know why they or other folks that already use Processing or p5 would want to use L5. (or even vs TouchDesigner, OpenFrameworks, etc for that matter). Good question! I gave some answers! To be presented later, but here's a few Answers:

- works on old/ancient computers (need to define this)
- stable, fast, consistent
- cross-platform
- consistent cohesive syntax
- long term reliability of Lua and Love2d
- small (size)
- can package up sketches into application
- advantages of compiled languages, advantages (and disadvantages) of scripting language, advantages (and disadvantages) of dynamic typing
- desktop-oriented though same code can (likely) be packaged for browsers via love.js (Emscripten)
- works offline - doesn't require Browser
- more TBA

lee@exquisitecorp@merveilles.town

Warning: fast flickering frames in video.

Lots of fun today: woke late, read in the cafe for two hours, took a long walk, cooked with friends, then two hours of no-input-mixer-board music with friends in the studio (and on clarinet).

I also worked on L5 for a couple hours and implemented a lot:

* I fixed looping! loop(), noLoop() and isLooping() should all work correctly now
* I added default width and height to the offscreen buffer for createGraphics
* I added the ability to draw textures to (custom) shapes with newly implemented functions texture(), textureMode() and textureWrap()
* I added a bunch of reference pages, example code and screenshots

Then implemented a rapid L5 studies test drawing randomly selected textures to screen.

lee@exquisitecorp@merveilles.town

a further iteration testing out the functionality added. i tried adding a folder of 50 JPGs to load but found it crashed the computer. i resized them to screen size instead of 4MB files and worked fine.

not sure what speed i should run this "screen saver" at or whether i should do the abstract or more clear version. here's a medium speed abstract one using graff images.

lee@exquisitecorp@merveilles.town

During my dogfooding process of creating little art and code projects ("L5 Studies") while working on the L5 language, tonight I added in a basic loadVideo function and created a minimal example showing how to play a video in L5.

Unfortunately, it can only play ogg theora (.ogv) video files, which means mov, mp4, mkv, avi files need to be converted prior to running. This is a limitation that results from the underlying Love2d library architecture as well as licensing issues, as far as I understand. While it is currently a requested feature, it does not look like mp4 and other video codecs will be added to the library too soon: github.com/love2d/love/issues/

To consider, shipping a little video converter tool or linking to one, just as Processing has a color selector and video recorder.

Processing: video requires a separate library. Can be any codec video. API differs from main Processing.

p5.js: video requires loading via DOM, then some trickery to hide from the screen and then to draw to canvas. not hard, but maybe a pain since a different workflow.

L5: video can only be Ogg Theora ogv file (so videos must be converted prior to being added to the sketch), but loading and playing video is trivial.

code editor on left with Video playing inside a L5 sketch window on right, showing 2 glitchy heads.
lee@exquisitecorp@merveilles.town

Added today:
* loadVideo() function
* Video page with example code, adapted from Godot documentation
* added ability to set background image via background()
* Added copy() and blend() pixel functions. copy() works great. blend() could use some work adding shaders to get parity with p5 (and some better blending)
* added ability to set custom cursors via filepath to cursor()

lee@exquisitecorp@merveilles.town

Some L5Studies work tonight. While watching the streaming Roguelike Celebration (which continues tomorrow roguelike.club for info), I mocked up this basic simple 6x6 broughlike-like roguelike featuring procedural map generation, and monsters that chases the player around the board. Not a full game but a fun start to test in L5 in about 150 lines of code.

A 6x6 grid roguelike generated from L5 code
lee@exquisitecorp@merveilles.town

Nice studio visit with @computersandblues today, checking out the inkblot library and showing my progress on L5 and jamming with PureData/PlugData.

In the evening, I wanted to make a Captcha font writer type program and it took me a surprisingly long time. I added applyMatrix() functionality to L5. Each key press currently redraws a scrambled matrix so the writing gets re-funkified with each keypress and mousepress.

code on left side. on right is the running code showing a window with the text Hello L5 written like an oldskool captcha text, pixelated, skewed, blurry
lee@exquisitecorp@merveilles.town

I solved a huge bug that I have been trying to solve for months, and that moves me much closer to getting ready to put out a pre-alpha version of L5. It relates to what I've been calling the "double setup problem."

Basically, I was calling a user's setup() function twice even though it's only supposed to run once. I did it once to grab sizing defaults, for example from the size() function or fullscreen. Then again inside the love.draw() once in order to draw graphics the first time.

By default, the underlying love2d framework only allows drawing in love.draw() but I am attempting to clone Processing's ability to display graphics in setup as well as in events like mousePressed and keyPressed. Basically what I had to do was majorly modify the love.run() underlying love2d, as well as love.load() and love.draw() and some other things. Finally, I have a solution, by handling canvas states at the correct place and buffer recreation.

Okay, then I found another bug. I could not get fullscreen() to correctly draw graphics to the screen any longer as a result of those changes to the underlying way that love2d functions.It's a testament to its incredible documentation that it didn't dawn on me til now that I should have perhaps studied Love2d's underlying functions for setting the mode because I was getting really stuck on why graphics rendering no longer worked. It turns out that I needed not just to declare setFullscreen but also setMode, so I needed to write this:

love.window.setFullscreen(true, "desktop")
local w, h = love.graphics.getDimensions(display)
love.window.setMode(w, h, {fullscreen = true, fullscreentype = "desktop"})

This to me looks bizarre, like I'm redoing the same thing multiple times, and it's likely a result of my monkeying with the underlying love.run but in any case, all 3 of these lines are needed to be able to draw graphics in setup with fullscreen on. Anyway...

I also made a change from p5.js style implementation of fullscreen(true) to Processing's cleaner/easier: fullscreen() or fullscreen(display_number) which will send to whichever specified monitor (by number of display).

lastly, i tried to figure out a way to allow a user to write code without a setup function but i couldn't figure out how to do that. Beyond this, I think I just want to finish the basic documentation reference site and get it up and then start doing a pre-alpha test with friends. Hopefully can wrap this in the next week or two. Maybe 2 - 10 hours more effort? (though by saying that, it guarantees i'll need double that time!)

lee@exquisitecorp@merveilles.town

In L5 Studies tonight I implemented a first version of a webcam library!

I'm not targetting finishing this by the time I release a pre-alpha of L5 but it is important to me that there is a useful audio library and a camera library that can be used with L5. I have already set up a test of a audio library a month ago and it went ok. Tonight I tried to take on accessing the webcam, which wasn't obvious what to do. I implemented a little webcam library using libjpeg-turbo in C wrapped in a little webcam.lua library that can be used with L5.

lee@exquisitecorp@merveilles.town

still goin'. have been working on the documentation site for the past couple days. i am cleaning up the reference and reviewing missing functions. i kind of wanted to freeze where i'm at and do a little pre-alpha release but i am still trying to pick up and implement more bits of functionality.

tonight i added a few helper conversion functions from p5/processing: boolean(), byte(), char(), float(), hex(), str(), unchar(), unhex().

more on the way.

lee@exquisitecorp@merveilles.town

Ok, from my git log I also added fract, log, norm, pow, sq, sqrt, asin, acos, atan, atan2, randomGaussian, randomSeed.

I experimented with a headless noWindow() mode but basically it just closes the window. It's not really a headless mode for rendering graphics/sketches, so I removed the functionality and will rethink it again in the future if it's possible to implement differently (maybe not).

I also spent a great deal of time tonight cleaning up the L5 documentation site to get it ready for a soft launch. It still feels a bit basic in terms of design, but good to get something up and then build from there. I have 186 reference pages now! But in a fit of reorganization I realize I broke the reference page image paths tonight before bed when I fixed a different path issue. So tomorrow I'll have to write one hell of a regex to fix all of them in their various sub-directories! But overall, things are in a good shape.

I have Openhaus open studios at ZK/U Thursday the 20th and would like to be at a point where I can tell friends about the site/language and have them start playing around and testing and giving feedback then.

Preview of the L5 documentation site showing Welcome to L5, with a banner at the top and text intro in the center
lee@exquisitecorp@merveilles.town

spent much of the weekend plugged into my laptop trying to grind through the damn reference pages and fixin' little bugs. Fixed some of the color modes like HSB and HSL which I think should be working.

So now you should be able to work with colors in all of the following ways:

fill(grayscale)
fill(grayscale, alpha)
fill(R, G, B)
fill(R, G, B, alpha)
fill(HSB)
fill(HSL)
fill('HTML color name') or
fill('#3-digit hex code') or
fill('#6-digit hex code') or
fill(color-object-table) or

wow, that's a lot. and that's why debugging took me some time. i had to build in some sanity checks and make sure things worked correctly for:
color(), fill(), background() - which also takes an image file input, and fixed lerp(), lerpColor(), brightness(), lightness(), hue(), alpha(), red(), green(), blue().

In addition, I had to fix all of the documentation pages for each of these, plus many others, test all of the code and produce screenshots to add to the documentation pages. It's a lot.

Still a lot left but i'm on a roll. Will keep grinding through it this week.

lee@exquisitecorp@merveilles.town

oh i am so deep in this hole. i am hand-checking every one of the 200+ reference pages, which can take me 3 to 15 minutes a page or so. For each page, I check my automatically converted p5.js to L5 reference code examples (i have a bash script that built these!). then i alter the description if needed, run all example code and screenshot, and then usually have to hand alter the parameters section as my conversion script didn't successfully build those. Also, for a sizeable minority of these reference pages I realize I left out a parameter or add in an extra error checking code or something. So that expands the time considerably.

Yesterday I checked and edited maybe 20 or so pages and fixed textAlign(), textWrap(), text() (added BASELINE positioning correctly this time), added in error correction to rectMode(), imageMode(), ellipseMode().

With each reference page i generally compare to both p5.js's reference as well as Processing's reference. Well, Cloudflare is down today so I can't check p5.js's site which relies on it. A good reminder to myself NOT to use services like that, I think, as it feels very un-resilient.

lee@exquisitecorp@merveilles.town

Right now I'm testing the L5 website to run without Javascript. I loaded it up in Links and w3 in the terminal, w3 with the img extension actually, and then with @dillo
Looks good.

I am using mkdocs with Material (a static site generator) for rendering the site. It makes many things easier and organized well for a documentation reference site for an API, but it has one big drawback: while the site works without JS, I think the site is larger because of it, 6MB page load, which I'd really like to get down to under 500k but not sure it's possible with this framework! I tried to use Firefox's built-in memory profiler and read its documentation so that I can learn how to cut things down but (argh!) the documentation site for Firefox is down due to a Cloudflare outage.

In the meantime, here's 4 views of the documentation site so far:
1. with w3 in the command line,
2. with netSurf
3. with Dillo (landing page)
4. with Dillo (an example reference page)

One other issue: I've been using webp images to make everything render out in small file sizes, but that doesn't worth on everything! I guess I'll have to have jpg fallback files? I anticipate another bash script to make that happen...

L5 documentation site in w3
L5 documentation site in netsurf - strange visual artifact in the title of the page - L5: A Processing library in Lua
L5 a Processing library in Lua - Welcome to L5 - documentation site preview in Dillo browser
example reference page for L5 showing the arc page with description and sample code, in Dillo browser
lee@exquisitecorp@merveilles.town

ah, i think i fundamentally misunderstood how the memory profiler and network tools work and what they mean.

i removed loading 2 custom fonts, but that's it. might slim the fonts and put em back.

in the meantime, locally testing the site is about 650kb and i think that when deployed based on gzip compression it might go down a few hundred k more. hopefully i'm understanding this correctly.

lee@exquisitecorp@merveilles.town

fixed a ton of smaller functions and built maybe 60 reference pages total now. there are still 140 page to do! lol. one accomplishment: i fixed multi display support and tested on windows and linux so you can correctly specify which display to run a sketch fullscreen in.

here's my multi monitor installation coded in L5 with the updated library.

an art installation with three monitors showing black and white collage images, with speakers flanking, an old windows laptop and flowers in vases
lee@exquisitecorp@merveilles.town

the last week was a bit of a blur as it was my last week in my art residency and then some international travel.

On my flight I got back to L5 studies and built "Photocrapier", a photocopy machine emulator with various features like rescanning, jiggling the paper, glitching the paper (i guess jiggling it a ton while scanning?), sliding the paper around, rotation, etc.

I wonder if i should package these things up as little binary files and make them available for download. or at least make my whole L5-studies code in a git repo.

lee@exquisitecorp@merveilles.town

Staying with my parents is a bit like a mini residency. This weekend I worked quite a bit on the reference pages website for L5 and performed a variety of smaller bugfixes to the lang.

* max() and min() can now accept tables
* added exp() function
* deltaTime global var now outputs millis() to match Processing/p5 output
* added resetMatrix() and fixed addMatrix() (and used these to complete the L5 studies project photocrapier)

only 60 of the reference pages (out of about 200ish total) left to do.

lee@exquisitecorp@merveilles.town

I did 10 more pages of the reference and deployed to the (not-so-secret) website. Basically, the reason it takes so long for each reference page is that I use writing the page as a chance to go through and bug fix the actual function I'm referencing. loadTable() and saveTable() were my time stealers today, among other things. for example, I modified saveTable() to deal with both a single table as well as a table of tables. That added...dozens of lines of code, plus debugging.

I also kicked off #DecemberAdventure today after forgetting about this annual tradition and then seeing it pop off on Mastodon here. I participated in the last 2 years and basically liked it so much I continued doing it year round on my log page, so I made an anchor tag to jump to my December Adventure 2025 posts here:

leetusman.com/nosebook/log/#de

1 2
lee@exquisitecorp@merveilles.town

#DecemberAdventure #L5

Today was spent working on reference pages and debugging the L5 language library, getting ready for the pre-alpha release. What I worked on today: save() can take an optional filename. I added an alternate data structure for single element tables to saveTable. I updated text() to deal with non-strings. Lots of fixes to events: key detection majorly mproved, fixing delete and function keys, etc reporting. Surgical fix so that keyTyped() reports true at the correct spot. Cleaned up mouseWheel() (no need to report x-value since wheel only scrolls vertically). The biggest update/fix was debugging and correcting the order of mouse handling events. mousePressed() runs as soon as the user clicks the mouse. mouseReleased() runs as soon as the user releases the mouse click. mouseClicked() runs immediately after mouseReleased(). Phew. Worked through a ton of reference pages and it looks like I have a bit under 30 left to do now. At the rate of 10 a day I seem to be on now maybe there are 2 - 3 days left.

1 1
lee@exquisitecorp@merveilles.town

A BIG DAY FOR ME: I HAVE AN INITIAL ALPHA RELEASE OF L5, which I have been working on for 4 months so far. I also have a nice website up for it with 200 documentation pages!

L5lua.org

My next step is to try to get the word out to friends to try out L5, give initial feedback, and see if folks find it useful, want to contribute, etc.

I then need to concentrate on getting some more tutorials done, more/better error() message reporting, just general bug-fixing/refactoring, and add a L5 mode to the Processing IDE application.

#DecemberAdventure #L5

8 25 45
lee@exquisitecorp@merveilles.town

I'm looking for some suggestions about the L5lua.org documentation site for L5.

At first I tried to optimize the site for small page load, focusing on making all images webp files.

Question 1: Is there some html or css only option that allows "falling back" from webp to loading jpg instead if needed for browsers that can't load webp?

Question 2: For example code that shows interaction or animation i'm showing animated gifs. These gifs can be quite large! I want L5 and the website to be able to work on lower-powered and lower-bandwidth computers, even ones without JS. Could my use of gifs be improved?

I'm currently recording the window with SimpleScreenRecorder at low fps as a mp4, then using imagemagick to convert to gif. On a tip, I found ezgif.com converts even smaller. Anyone know their 'recipe'? I would love to automate the process in the command line.

Question 3: Any other tips for how I can make the site work better, particularly for low bandwidth and offline browsing?

Boosts ok! Politely written responses appreciated!

lee@exquisitecorp@merveilles.town

I've been adding lots of examples to the L5 documentation site, including implementations of 10print and Conway's Game of Life written in L5. I also adapted some tutorials and examples from p5.js (thanks to Creative Commons licensing!).

l5lua.org/examples/conways-lif

I still need to add more tutorials and to build some better "getting started" materials that show exactly how to get a Mac and Windows machine set up specifically for a cozy coding environment with L5.

#L5 #DecemberAdventure

lee@exquisitecorp@merveilles.town

It took me two days. After a comprehensive review of my own intro coding notes for p5.js and reviewing many other creative commons licensed sources I selected and then very liberally adapted and built off the Happy Coding Tutorials to create an 11 part comprehensive:

A complete introduction to programming with L5

l5lua.org/tutorials/

I am still interested in developing a few more useful tutorials on setting up for various systems (Mac, Windows particularly) for a variety of code editors. Open to suggestions and contributions!

Also want to clean up and build out the working with video tutorial and create a new one on breaking out to the wider system with Lua's os.execute()

In the process of working on the tutorials I found minor inconsistencies between L5 and p5.js in key and mouse handling, so I patched it so they have parity.

#L5 #DecemberAdventure

lee@exquisitecorp@merveilles.town

I'm wondering where the right place to set up "discussions" should be for L5. There is a robust Discord and Discourse forum for Processing and p5.js, and yet I'm not on those things. There is also a subreddit, but again I'm not on that.

Maybe I could add a github discussions 'forum' since the repos are already there? But do i want to enable capture within the Microsoft system there? Alternatively, maybe join the Discourse forum and have a L5 forum heading? But I don't know. I do think these things matter and help spread the word about the library and {code, documentation} contribution. I'm just not keen on getting deeper into other "social media" and related.

Separately: I added @oppen 's Walking Lines example to the examples page. I'd love to have more community-contributed examples and tutorials by the way!

lee@exquisitecorp@merveilles.town

after installing a new hard drive (and having to reinstall my Void Linux distro on the new drive), i decided to re-install the OS on my parents' unused 2014 macbook. i thought about putting linux on there but the goal is to have an old Mac to test L5 programs on. I installed Love2d and L5, tested a bug I had found on iOS and also found it on the Mac. It's a minor bug that when going to fullscreen, if you had set up a background color in setup() it doesn't persist when going to fullscreen. Somehow the Mac side it clears/resets the drawing buffers. Not present on Linux. Need a Windows machine to test and see if it persists. I noted the bug here, in case anyone wants to test on other eras of macOS or on Windows until I get my own old windows machine.
github.com/L5lua/L5/issues/3

I also tested to see if it had the same shader error reported earlier from the 2009 Windows machine but it didn't. It worked fine for shader code.

lee@exquisitecorp@merveilles.town

Day 4 of #Genuary2026

prompt: Lowres. An image or graphic with low resolution, where details are simplified or pixelated.

This one feels in my wheelhouse much more than the previous ones. So I started having some fun and made something I'm excited about. I think I will use it as a 'filter' to create a music video for some no-input mixing board mixes I want to put online.

Little test here. I was having too much fun so this is a larger video file with my own music recorded with my collaborator ZZZelin. I'll upload some screenshots too.

#L5

lee@exquisitecorp@merveilles.town

and here's the code for that one:

```
--genuary 2026 day 4
require "L5"

function setup()
fullscreen()
img = {}
for i = 1, 9 do
img[i] = loadImage('assets/graff/'..i..'.jpg')
end
mouseDragged() --pick an image to start
end

function draw()
buffer_w = map(mouseX, 0, width, 15, 200)
buffer_h = map(mouseY, 0, height, 15, 200)
pg = createGraphics(buffer_w, buffer_h)

pg:beginDraw()
image(current_img, 0, 0, buffer_w, buffer_h)
pg:endDraw()

translate(width, height)
rotate(PI)
image(pg:getCanvas(), 0, 0, width, height)
end
function mouseDragged()
current_img = random(img)
end
```

lee@exquisitecorp@merveilles.town

Day5 of #Genuary2026 in #L5. The prompt is to write Genuary in some way without a font. I made this little drawing thing and drew the title, using an offscreen buffer that continuously repeats my drawing

--genuary 2026 day 5
require("L5")

function setup()
background(255)
blocksize = 250

-- Create offscreen canvas
offscreenCanvas = createGraphics(800, 600)
end
function mouseDragged()
background(frameCount % 255)
offscreenCanvas:beginDraw()

strokeWeight(random(7))
stroke(random(255))
line(mouseX,mouseY,pmouseX,pmouseY)

offscreenCanvas:endDraw()
end

function mouseReleased()
for y=1,height,blocksize/4 do
push()
translate(0, y)
image(offscreenCanvas:getCanvas(), 0, 0)
pop()
end
end

genuary written in a grayscale flowy lines, running down the page repeating
lee@exquisitecorp@merveilles.town

Day7 of #Genuary2026 and today's prompt was something related to booleans. Programmed in #L5
(Hmm, on upload, i see the video gets upscaled! it should only be 100 pixels wide! that's why this looks so pixelated).

Also, on reflection, this doesn't look like generative art as such, but it was still fun to program and i'm ready for bed! :)

--genuary 2026 day 7
require("L5")
function setup()
windowTitle('Genuary day 7: Boolean play')
total = 0
val = {
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
}

size(110,200)
textAlign(CENTER, CENTER)

describe('a grid of values that can be toggled between 0 and 1 when clicked.')
end

function draw()
background(0)
textSize(80)
fill(255,0,0)
text(total,width/2,height-50)
fill(255)
textSize(10)
total = 0
for y = 1,#val do
for x = 1,#val[1] do
text(val[y][x], x* 10 , y * 10)
if val[y][x] == 1 then
total = total + 1
end
end
end
end

function mouseDragged()
local _x = floor(mouseX/10)
local _y = floor(mouseY/10)

local total = 0
if val[_y][_x] == 1 then
val[_y][_x] = 0
else
val[_y][_x] = 1
end
end

lee@exquisitecorp@merveilles.town

I added a web-based survey for L5 (there is the option to fill it out, then send it via email). I had tried to do it with just HTML and CSS but the mailto link didn't copy the info correctly so there is now a minimal javascript to send the info correctly. There is also a link to a google form, as well as a <noscript>-wrapped text that explains what to copy an paste and send in an email. I tested on Netsurf, Dillo, Brave, Firefox, w3m and offpunk.

I also tightened up some info on the L5 landing page.

The biggest recent site change I made was that I added a downloadable zip folder as the recommended L5 Starter project, based on feedback from Gottfried, who filled out the survey! This should make it easier for folks to begin using L5.

I put out a local call in my network in NYC to meet up to work on L5 next week as a group to document installation and test on old Macs and PCs and more than 10 folks responded! I'm now looking for a room for us all to meet next Tuesday afternoon and wrote to a couple friends looking for space suggestions.

#L5

lee@exquisitecorp@merveilles.town

Although Genuary is still going on I felt drawn to work on something without the prompts today. I started working on something with scrolling marquee text, but printing out an excerpt from my daily journal entry. Obvious references are the works of Barbara Kruger and Jon Rubin, but I wasn't thinking of that at the time, and this is much simpler, made in about 20 minutes. Just came out of me. Coded in #L5.

CW: mentions violence, political news

require("L5")

function setup()
windowTitle("Thinking out loud")
textSize(100)
fill(0)
noStroke()
fullscreen()
describe("scrolling text from top to bottom, alternating direction, vaguely reminiscent of a flag, with thoughts on today.")

messages = loadStrings('thoughts.txt')
--print(messagePos[1])
--print(#messagePos)
--messagePos = {
messagePos = {}
for i=1,#messages do
messagePos[#messagePos + 1]=
{x = random(width), y = 100 * i - 50, delta = 1, bg = 'red', c = 'white'}

--even or odd?
if (i % 2 == 0) then
messagePos[#messagePos].bg = 'white'
messagePos[#messagePos].c = 'red'
else

end
end
fill(0)
end

function draw()
background(255)

for i=1,#messagePos do

fill(messagePos[i].bg)
rect(0, messagePos[i].y - 100, width, 100)
fill(messagePos[i].c)

text(messages[i], messagePos[i].x,messagePos[i].y)
messagePos[i].x = messagePos[i].x + messagePos[i].delta

-- check offscreen
if messagePos[i].x > width or messagePos[i].x < -width then
messagePos[i].delta = messagePos[i].delta * -1
end
end

end

lee@exquisitecorp@merveilles.town

I switched from Genuary projects back to working on #L5. I am doing testing of alternative implementations of filter() with fallbacks for older machines that can't handle some aspects of shader code. My research shows me that some GPU stuff is needed for Love2d to work at all, so i tried to match the minimum requirements. Will be doing testing this month on a variety of older machines and OSes.

The L5 community survey I put out has only gotten a few responses so far but they've been extremely helpful and led to some fixes and better documentation and starter. From one person's survey I learned of some more synthesis options in Love2d, so I am feeling much more confident we could match most of the functionality of Processing's Sound Library or p5.sound. I've mapped out the Processing Sound API and ways to replicate with Love2d native and adding in a lightweight lovefft library. I have other stuff to work on for the next few months but will definitely put time into this in the spring.

lee@exquisitecorp@merveilles.town

Met with Jessica to do some brainstorming to build out documentation for those interested in contributing to L5. we talked about ease of use of p5.js but it’s still a fairly extensive development environment to set up or contribute documentation to. i had an online meeting with a team of students interested in doing usability testing of L5 for beginners and we talked about some ideas of how that could be done. there’s a big bottleneck, or a barrier is more accurate, that the easiest way for beginners to get started coding is to drag their directory holding their project with code on top of love2d, but that won’t print out “print()” function code, which instead requires command line set up currently. i want to complete a L5 mode for the processing pde but not sure how long that will take.

had an alternate idea. what if we override the Lua print command so that all print statements display (in white text?) in the render window as well as print out in cli? this would help beginners and provide an onscreen console for debugging, separate from the window error messages. but it does mean always rendering and maybe you don’t want that. maybe there is a printDebug() or printScreen() function that you place in setup() that turns on the print render, and that we add to the L5-starter example. this could work like printing in pico-8, rendering from top to bottom with an L5_env.printY that tracks the y-position for the next print(). pico-8 is smart and changes the text color based on the underlying pixels.

lee@exquisitecorp@merveilles.town

I implemented this in a test branch! Took me some time.

Documented in this github issue:
github.com/L5lua/L5/issues/7

The branch is here:
github.com/L5lua/L5/tree/print

To use, add the showPrint() command to your skech, and it will now display all debug print statements in the window.

The goal is to make #L5 easier to use for those not using the command line.

I'd love some feedback on this! Should this be added to L5 officially? (And where should these kinds of discussions be held?)

lee@exquisitecorp@merveilles.town

Worked more on this today.

showPrint() now uses the default font no matter what other user fonts are loaded. The default size of the onscreen text is 16, but you can now specify an optional textsize argument.

Download L5 from the print-in-window branch and add showPrint() to you setup() to test:
github.com/L5lua/L5/tree/print

I think this is a big improvement especially for beginner users but would love feedback.

#L5