Skip to content

Instantly share code, notes, and snippets.

View wong-justin's full-sized avatar

J Wong wong-justin

View GitHub Profile
@wong-justin
wong-justin / gist:062c6929da17938591ee4f40a1f1ca6e
Last active August 24, 2025 03:17
some elm error messages
"The type annotation for x says it can accept y, but the definition says it has z. Is the type annotation missing something? Should some argument be deleted? Maybe some parentheses are missing?"
"The x thing needs y, but I see z instead. What is missing? Are some parentheses misplaced?"
"You cannot mix x and y without parentheses. I do not know how to group these expressions. Add parentheses for me!"
"This x has multiple ys."
"You have declared that x is an effect type, but I cannot find a custom type named x in this file!"
"This kind of effect module must define an x function, but I cannot find x in this file!"
"You are trying to expose x multiple times! Remove one of them, and you should be all set!"
"I do not see any super similar names in this file. Is the definition missing? Maybe you want x instead? These names seem close though: x, y, z."
"The x syntax is for exposing variants of a custom type. It cannot be used with a type alias like y though. Remove the x, and you should be fine!"
"You are trying to
"old dog/\nher ailing heart beats/\nagainst my leg/\n@witnwords1"
"most nights, the moonlight/\noutlines all the shadows scattered outside,/\neven those within/\n@fcmwrite"
"The ladies with feather tails glide up the escalator over Las Vegas Boulevard. They talk shop, feathers dusty and nylons clean. @anikeaten"
"darkness will go/\nwhere the light/\nrefuses/\n@bobcarlton3"
"her shadow forms depressions/\nat the bottom of the door/\nall along our baseboards/\nthe floor grows black/\nas she turns on the dark/\n\n@fcmwrite"
"Grief is rotting fruit but you are starving/\nsalt-bitter skin/\nand inside/\ndry seeds/\n\n@austinsively"
"Mosquitoes land on my chest. Dry for months. But little legs, mouths, search for blood. @_RobinJohnson"
"They left the parking lot: she to another man, he to an empty condo. Their kiss lasted hours: her silence after, much longer. @Alex_Z_Salinas"
"Flames reflect in my wine glass, alive and rhythmic. Above the fireplace, you sit. Still. Quiet. Are you warm? @_RobinJohnson"
"He took an
---
// mostly following:
// https://carbondesignsystem.com/developing/web-components-tutorial/step-1/
//
// later i can remix by using components from here:
// https://web-components.carbondesignsystem.com/
//
// "dependencies": {
// "@carbon/web-components": "=2.34.0",
// "@carbon/styles": "=1.86.0",

Permitted content and nesting rules for HTML elements

element permitted content
<a> transparent, except that no descendant may be interactive content or an <a> element, and no descendant may have a specified tabindex attribute.
<abbr> phrasing content
<acronym>
<address> flow content, but with no nested <address> element, no heading content (<hgroup>, <h1>-<h6>), no sectioning content (<article>, <aside>, <section>, <nav>), and no <header> or <footer> element.
<area> None; it is a void element.
<article> flow content.

Current usage:

createCanvas(100, 100, WEBGL)
shader = createShader(vert, frag)
filter(shader) // error, only expects THRESHOLD|GRAY|OPAQUE... 

Proposed usage:

@wong-justin
wong-justin / clockchars.flf
Created November 14, 2022 00:51
Simple unicode-block FIGlet font for clock times
flf2a$ 5 5 24 -1 8 0 0 0
A blocky font for displaying digital clock times. Created 2022-11-12. J.Wong
Characters: space,0-9,colon,Aa,Pp,Mm. Actual max length ~9, but chkfont
doesn't recognize multibyte unicode chars (█ is 4 bytes). Sample:
██████ ██ ██ ██████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██████ ██████ ██████ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██████ ██ ██ ██ ██
$$@
__________________
/ \
venn / \
diagrams / __________\_______
/ curvy / \ \
/ / \ \ ascii
\ / / \ tables
\ / this / \
\ / / \
@wong-justin
wong-justin / livereload.py
Last active May 10, 2022 19:34
A python live reloading server. Ping it regularly, looking for json response {"files_changed": true}
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path
import os
from textwrap import indent
import click
### server and file watching logic
class FilesTracker: