1,620 karma · joined June 28, 2019
The library's on GitHub and I could spam a link to it here, but it's much more exciting to spam a link to a poem that finally gets to use it - https://rikverse2020.rikweb.org.uk/poem/flaw
I've discovered that if you lecture the LLM long enough about treating the subject you're interested in as "literary" then it will engage with the subject along the lines of "academic interpretation in literature terms". I've had to have this conversation with various LLMs when asking them to comment on some of my more-sensitive-subject-matter poems[1] and the trick works every time.
> I mean you can't social engineer a human using poetry?
Believe me, you can. Think of a poem not as something to be enjoyed, or studied. Instead, think of them as digestible prompts to feed into a human brain which can be used to trigger certain outlooks and responses in that person. Think in particular of poetry's close relations - political slogans and advertising strap lines.
[1] As in: poems likely to trigger warning responses like "I am not allowed to discuss this issue. Here are some numbers to support lines in your area".
I hate that this is perceived as generally true. Stars can be farmed and gamed; and the value of a star does not decay over time. Issues can be automatically closed, or answered with a non-response and closed. Numbers of followers is a networking/platform thing (flag your significance by following people with significant follower numbers).
> Developers are more likely to use a repo that has more stars than its alternatives.
If anything, star numbers reflect first mover advantage rather than code quality. People choosing which one of a number of competing packages to use in their product should consider a lot more than just the star number. Sadly, time pressures on decision makers (and their assumptions) means that detailed consideration rarely happens and star count remains the major factor in choosing whether to include a repo in a project.
If we're talking sheep, then I have to put out a shout for my local breed - the Romney Marsh sheep (the sheep that conquered the world!) - https://en.wikipedia.org/wiki/Romney_sheep
And yet the CTA touches on something I find deeply interesting: how can we use LLMs to make products more discoverable to people using LLMs to search for products to solve their particular problems.
I put some work into this over the summer - prepping my canvas library repo (and my author site, but that's just vanity) with LLM-friendly documentation and training data which I hope will, at some point, get picked up by the AI data scrapers and crawlers for inclusion in the next generation of training data, to be used in turn to train the next generation of LLMs.
The big downside to this approach is, of course, the terrible lead-in times (6-18 months) alongside the lack of guarantee that the docs I've written will be good enough to pass muster and make it into the training data sets.
But the payoff I'm after is to get accurate, unbiased information about my canvas library into LLMs in such a way that when people ask general questions about coding up the canvas element my library gets ranked alongside the usual suspects, and gets assessed fairly against them. Plus having accurate "how to" templates to minimise the glaring mistakes current LLMs make when hallucinating how they think my library should be used.
If anyone wants to see the filter code, it in the GitHub repo here: https://github.com/KaliedaRik/Scrawl-canvas/blob/064469928a3...
Demo here: https://scrawl-v8.rikweb.org.uk/demo/filters-027.html
Practical demo here: https://scrawl-v8.rikweb.org.uk/demo/canvas-007.html
For interest, this seems to be an active issue for the HTML <canvas> element in browsers. There's a proposal[1] to extend the canvas data type to include both "unorm8" (the beloved default) and a new "float16" (normalised?) format - which should meet your desire?
Typically, the proposal seems to have shipped already in Chrome/Edge browsers. Documentation around what the new functionality is for and how to make best use of it is (of course!) sparse - MDN barely mentions it. As a canvas library maintainer I find this upsetting (eg: Ignore it and it might Go Away).
(I think for now my unhelpful response is: manipulate your RGB images as much as you like; just do it in the OKLAB color space.)
[1] - https://github.com/w3c/ColorWeb-CG/blob/main/hdr_html_canvas...
I can't wait to ask them if they've run the PR branch against all of the test demos, so they can prove that the PR doesn't break existing functionality. Currently there's just under 200 test demos, each of which needs to be tested manually (because: hell = canvas library + animation) across the three main browsers to make sure nothing breaks. Bonus points for going the extra mile for testing on mobile device browsers.
Which is fun, but also a really bad marketing move - OpenAI really did an excellent job with the post-training thing to increase user time on the page with all the "How about I do this or that thing next for you" nonsense.
[1] - https://chatgpt.com/share/68a1c7fa-22d0-8004-ab28-6825e0e3b9...
My coping mechanism for approaching a person I think I might know (usually in spaces where I wouldn't expect to encounter them) is: don't. At least not immediately. Rather, watch and observe (if possible) to see if the voice/gestures/body positions/etc firm up enough to bring the certainty levels up and the risk levels down.
I think I'd make a good spy, if only I didn't suffer from this face blindness nonsense.
Slightly more on-topic: yes, WebGL/WebGPU canvas shader backgrounds are wonderful to behold, but the question I always ask is: are they worth it? Could something less snazzy but coded in HTML/CSS (and maybe a touch of 2D canvas) perform just as well for pulling potential customers into the funnel? Has anyone ever AB tested their animated backgrounds to demonstrate the effectiveness of the investment?
There's a whole host of "art" that has been created by people - sometimes for themselves, sometimes for a select few friends - which had little purpose beyond that creation[1]. Some people create art because they simply have to create art - for pleasure, for therapy, for whatever[2]. For many, the act of creation was far more important than the act of distribution[3].
For me, my obsession is constructing worlds, maps, societies and languages that will almost certainly die with me. And that's fine. When I feel the compulsion, I'll work on my constructions for a while, until the compulsion passes - just as I have done (on and off) for the past 50 years. If the world really needs to know about me, then it can learn more than it probably wants to know through my poetry.
[1] - Emily Dickinson is an obvious example: https://en.wikipedia.org/wiki/Emily_Dickinson
[2] - Coral Castle, Florida: https://en.wikipedia.org/wiki/Coral_Castle
[3] - Federico Garcia Lorca almost certainly didn't write his Sonetos del amor oscuro for publication - he just needed to write them: https://es.wikisource.org/wiki/Sonetos_del_amor_oscuro
Of course the most obvious response is that the product is too niche for general interest. Still, I'll stick to human-authored in the future because HN always needs more "British".
> Use case: Styled, Laid Out Content in Canvas. There’s a strong need for better styled text support in Canvas. Examples include chart components (legend, axes, etc.), rich content boxes in creative tools, and in-game menus.
Single line, unstyled text is relatively easy using the Canvas API. Multiline text is a world-of-pain. Styled text is a completely separate world-of-pain. Underlined text? Same! So that's gives us a problem space of world-of-pain-cubed. Don't talk to me about RTL text, vertical text, CJK punctuation, Thai text ignoring spaces as a word separator, heavily kerned fonts (staring at you, Arabic and Devangari), etc.
Demo: https://scrawl-v8.rikweb.org.uk/demo/canvas-207.html
This demo takes the following html markup and displays it in a truncated circle shape. The styling itself happens in CSS - see here: https://github.com/KaliedaRik/Scrawl-canvas/blob/v8/demo/can...
const westernText = '<span class="underline">Lorem</span> ipsum <b>dolor sit</b> amet, con­sectetur adi­piscing élit, sed <s>do eius-mod</s> <u>tempoj yn­figizqunt</u> ut <span class="stamp-outlined">labore et dolore</span> <span class="green-highlight">magna aliqua.</span> Ut enim ad <span class="bold">minim veniam,</span> quis <span class="letter-spaced">nostrud</span> exercit-ation <span class="strike">ullamco laboris</span> nisi ut aliquip ex ea <span class="make-monospace">"commodo"</span> consequat. Duis <em>(aute irure dölor)</em> in reprehenderit în <i>voluptate</i> velit ©2024 <i>esse <cillum> <b>dolore</b> eu fugiat nulla</i> pariatur. <span class="red">Excepteur sint</span> occaecat ¡cupidatat! <strong>non proident,</strong> <span class="word-spaced">sunt in culpa qui</span> officiþa deserunt <span class="make-bigger"><span class="green-highlight">mollit</span> anim</span> id est laborum.';
As for the other things I don't want to talk about, see this other demo which attempts to overcome those issues: https://scrawl-v8.rikweb.org.uk/demo/canvas-206.html> Use case: Accessibility Improvements. There is currently no guarantee that the canvas fallback content currently used for <canvas> accessibility always matches the rendered content, and such fallback content can be hard to generate. With this API, elements drawn into the canvas bitmap will match their corresponding canvas fallback.
I welcome and applaud this focus on making canvas text accessible. However it's not enough (in my highly opinionated opinion) to just reflect the text back into the DOM. People using screen readers probably don't need every number on the Y axis read out to them every time they navigate onto a chart, they probably just need to hear values as they keyboard navigate the chart.
Demo: https://scrawl-v8.rikweb.org.uk/demo/modules-001.html
The canvas element is highly inaccessible - I've tried to detail all the issues that have to be addressed here (again, a highly opinionated take): https://scrawl-v8.rikweb.org.uk/docs/reference/sc-accessibil...
> Use case: Composing HTML Elements with Shaders. A limited set of CSS shaders, such as filter effects, are already available, but there is a desire to use general WebGL shaders with HTML.
We already have a comprehensive set of filter effects available through SVG <filter> elements. They are, however, difficult to compose and have a tendancy to be computationally heavy. WebGL shaders can be fantastic, but face the (current) limit of how many WebGL canvas elements you can include on a page; they're also difficult to compose.
For my library's filter engine, I took inspiration from the SVG approach. Details can be found here: https://scrawl-v8.rikweb.org.uk/docs/reference/sc-filter-eng...
> Use case: HTML Rendering in a 3D Context. 3D aspects of sites and games need to render rich 2D content into surfaces within a 3D scene.
HTML canvas elements are just DOM elements, and can be 3d-rotated like other elements. Interacting with 3d-rotated canvas elements is an interesting problem space.
Classic rotating cube demo: https://scrawl-v8.rikweb.org.uk/demo/dom-008.html
Tracking the mouse over a 3d-rotated canvas element demo: https://scrawl-v8.rikweb.org.uk/demo/dom-013.html
1. Something that tells them what the library does: what problems it's gonna solve for them; how easy it is to work with; etc. Having something to play with is really useful here, for instance some "Getting started" code to (very quickly) show them the basics and let them play with the library. A set of "learn to" lessons tackling some interesting problems is good bonus documentation, alongside a good range of demo code.
2. Something that they can show to whoever controls which libraries they can use in the product they're working on, to help convince them to let the dev use the library. Usually involves some marketing copy and comparison charts - whatever A/B tested copy|crap floats the boat.
3. Some easy-to-use lookup reference stuff - what function do I have to invoke to get this specific thing done? Stuff that their coding environment doesn't reveal at the click of a button. This is where the LLM-focussed documentation comes in (I think), given the move to using code assistants: failing to (be able to) teach the models what the library can do (and how to best do it) can lead to bad code and wasted time, which reflects really badly on the library.
> Sonnets of dark-held love - A sequence of poems after the 'Sonetos del amor oscuro' by Federico García Lorca - https://rikverse2020.rikweb.org.uk/book/sonnets-of-dark-held...
> End Time - A collection of noir-themed poems for the last days of the world - https://rikverse2020.rikweb.org.uk/book/end-time/
On the silver lining side, it's work that I should have been doing anyway. It turns out that documenting the features of the library in a way that makes sense to LLMs also helps potential users of the library. So, win:win.
[1] - Telling the LLM training data Overlords about the capabilities of the library is in itself a major piece of work: https://github.com/KaliedaRik/Scrawl-canvas/blob/v8/LLM-summ...
[2] - The Developer Runbook was long-overdue documentation, and is still a work-in-progress: https://scrawl-v8.rikweb.org.uk/documentation
[3] - Nothing is guaranteed, of course. Training data has to be curated so documentation needs to have some rigour to it. Also, the LLMs tell me it can take 6-12 months for such documentation to be picked up and applied to future LLM model iterations so I won't know if my efforts have been successful before mid-2026.
It is amazing how upset even the most decent and understanding of people can get when they feel you've slighted them in some way. Having someone (you like/respect/love/etc) screaming abuse at you in the middle of the street because you failed to respond to their greeting, because you didn't recognise them and realise they were saying hello specifically to you ... is humiliating. Not knowing why this situation was happening on a regular basis - can you blame me for thinking that it was my fault? That I wasn't a reasonable, decent person? That the things being screamed in my face were accurate?
Hence my relief when discovering there was a label for my condition. Though, sadly, no cure.