Stoked for my WebGL tutorial on Thursday morning at @pycon. 3:30h to show all the basic components of 3D graphics? Might be ambitious! But I'll do my best.
Hopefully the conference wi-fi won't betray us
Stoked for my WebGL tutorial on Thursday morning at @pycon. 3:30h to show all the basic components of 3D graphics? Might be ambitious! But I'll do my best.
Hopefully the conference wi-fi won't betray us
Because I do a fair amount of frontend work but think most frontend frameworks are overkill, I use #HTMX and #alpinejs a lot. And @glyph's #NBPy talk made me think about what a #PyScript package that combines both and provides #python handles to both would look like.
What could I build if I had a drop-in #django package that gave me all the interaction I wanted while writing python code?
File formats as Emoji: 0xffae
by @beet_keeper
tldr: https://emoji.exponentialdecay.co.uk
File Formats As Emoji (0xFFAE or 0xffae) might be my most random file format hack yet. Indeed, it is a random page generator! But it generates random pages of file formats represented as Emoji.
The idea came in 2016 with radare releasing a new version that supported an emoji hexdump. I wondered whether I could do something fun combining file formats and the radare output to create a web-page.
Along came a spare moment one weekend, some pyscript, and bit of sqlite, et voilà. File Formats as Emoji (0xFFAE) was made a reality.
@talkpython @freakboy3742 @mkennedy a wonderful episode!
I took part in #PyWeek 39 over the weekend and made a game in #PyScript. It's a single-tap rhythm game. Should work on any desktop browser and most new phones. It was a fun challenge to make a game where the realtime music sync is so important. You want to let people tap a little too late and still have the game allow it. You want it to be playable with Bluetooth headphones and keyboards that add a lot of latency.
#PyScript now has experimental support for #PygameCE !
Has anyone seen it in the wild?
https://docs.pyscript.net/2025.2.3/user-guide/pygame-ce/
via @pythonbytes
I wrote a retrospective on my #Genuary adventures with generative art with #PyScript and #Three.js.
#GenerativeArt #CreativeCoding #WebGL #Python
https://lukasz.langa.pl/62eae3e6-a598-4a1e-8f65-586d16e1bd0f/
#genuary26 prompt: symmetry.
#genuary27 prompt: something interesting with no randomness or noise.
If there's gotta be no randomness, you need to introduce control. I made this cute discontinued device called the #Monome Arc work with #PyScript. This is usually driven by a UDP server, but turns out browsers can't use UDP, so I wrote a WebSocket bridge. Looks like it works
#genuary21 prompt: a collision detection system.
#genuary25 prompt: one line that doesn't intersect itself.
The line segments really don't intersect. The first few seconds don't explain it, but things get more obvious later. Sound on.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-21-25/latest/
#genuary18 prompt: What does wind look like?
#genuary22 prompt: Gradients only.
Looks more like a plant or urchin than wind, but this is where I ended up
This is a breakneck pace. I'm falling behind the submissions, but hopefully things will get smoother from now on.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-18-22/latest/
#genuary17 prompt: What if pi=4?
#genuary19 prompt: Op art.
I couldn't come up with anything impressive for just pi=4 so I combined it with op art, then it came to life, especially if you have a comparison right away. This is why the video contains the Python prompt on the top and you can see the drastic change when pi becomes 4 for a while.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-17-19/latest/
#genuary16 prompt: Generative palette.
A kaleidoscope with LUTs, colored spotlights, and colored textures, synchronized to music.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-16/latest/
#genuary11 prompt: Impossible day.
#genuary12 prompt: Subdivision.
I combined the prompts since what I wanted to do for ages now is frequency-aware realtime audio visualization. This is the result. Makes most sense with the volume up.
As you can confirm in the source code, the lighting action is all driven by the music.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-11-12/latest/
#genuary10 prompt: only use TAU in your code, no other number allowed.
That's perfect since Python's got it in the standard library
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-10/latest/
#genuary8 prompt: Draw one million of something.
#genuary9 prompt: The textile design patterns of public transport seating.
Not much time so combined two prompts. Efficiency! In Poznań
Made with #PyScript:
https://pyscript.com/@ambv/genuary-prompt-8-9/latest
#genuary7 prompt: Use software not intended to make images.
I wrote a Python program that takes an image and produces a .WAV file. This audio file sounds TERRIBLE, but viewed with an audio editor's spectrogram capability... shows the image
Made with #PyScript:
https://pyscript.com/@ambv/genuary-prompt-7/latest
#genuary6 prompt: A landscape using only primitive shapes.
This is an evolution of my "42 lines of code" entry from Jan 3rd. This one's well over 200 lines of code.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-6/latest/
#genuary5 prompt: Isometric art.
It's game of life. History goes down. I've seen a visualization like this last year and wanted to recreate it.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-5/latest/
Prompt: Black on black.
Sorry, not sorry. This interpretation just seemed like the most natural thing to do.
Made with #PyScript:
https://ambv.pyscriptapps.com/genuary-prompt-4/latest/