r/creativecoding • u/selixdesign • 9d ago
Experimenting with interactive ASCII spirals.
(It’s a bit laggy due to performance issues)
5
u/Flimsy-Importance313 9d ago
What software and language are you using?
I am very interested in math simulations and this seems like a good showcase for that.
9
u/selixdesign 9d ago
it has been done entirely in HTML/CSS and JS vanilla without frameworks :)
5
u/TrainingTheory552 9d ago
how...
8
u/YSMLA_ 8d ago
Using Claude.
And why not use frameworks? Code is usually completely unmaintainable when using vanilla frameworkless.
-2
u/selixdesign 8d ago
It’s written in vanilla simply because the project started 3 months ago from a much more basic version than what you see now, and over time I’ve developed it further through research without changing the framework. In 2026, I think that refactoring a project like this is the least of our worries. And yes, i also used Claude Code for bugs, artifacts and understand how to do some things :)
4
u/YSMLA_ 8d ago
Only for your token worries.
Refactor it unless you like paying 10 times to tokens.
3
u/VanillaSwimming5699 5d ago
You’re incorrect, LLMs do great in vanilla JS and refactoring this to 5 different languages and frameworks in 2026 is trivial.
“Paying 10 times to tokens” is also just wrong, $20 Claude code covers 100x the amount needed to refactor this weekly it’s a non-issue, you just don’t like it because he used AI.
1
u/YSMLA_ 5d ago
As a 20 years dev, you're absolutely wrong.
Architecture is never trivial, even when AI does it.
One giant vanilla file will suck the money out of your pocket for a simple reason, context window size. You really have no clue right? You're a proper vibe coder.
And I love AI tbh.
Well that's exactly the difference between actual devs and vibe coders, so no surprise there.
3
3
u/strppngynglad 9d ago
claude?
2
u/selixdesign 9d ago
I used it for playing with windows and fixing bugs or artifacts, but the idea is entirely mine
2
1
1
u/herocoding 8d ago
This looks amazing!! Thank you very much for sharing.
Would you mind sharing some details? How are the spirals modelled?
Yessss, please release, please share the code if you want.
5
u/selixdesign 8d ago
I'll release the project on Github.
2
2
2
2
2
1
u/thebiggerbear 8d ago
this seems to be multiple tabs communicating with each other, how do they know each other's position on your screen?
1
u/collinalexbell 8d ago
Chrome extensions API can query window positions on some windowing systems.
1
1
u/danifv591 5d ago
Using the Broadcast Channel API you can send info between tabs of the same origin:
https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API
1
u/MinonRyu 6d ago
This is beautiful! I love how the spiral connects across both windows. Does each window render its own part, or are they sharing a single coordinate system?
-2
u/collinalexbell 9d ago
Try that Linux!! (Wayland, Linux's modern windowing protocol does not allow apps to communicate their positions to each other).
1
u/selixdesign 9d ago
i haven't tried yet
1
u/Then-Phrase5768 9d ago
Hey but seriously. Nice work. Is it hard to get the windows passing data between each other?
4
u/onekirne 9d ago
uh no.
1
u/collinalexbell 8d ago
Uh. Yes. This is where I post from. I know what I'm talking about. I've implemented compositors in both X11 and Wayland. There is discussion right now on Gnome mailing list talking about the failings of Wayland in this regard.
1
u/NoenD_i0 8d ago
why yo window in 3d wtf
1
u/collinalexbell 8d ago
I made a 3d Linux desktop environment. These people are arguing with someone who has been paid money for work done with these APIs
3
u/StraightEnergy8966 9d ago
100% wrong
1
u/collinalexbell 8d ago edited 8d ago
I'm right about this on Wayland. I implemented HackMatrix 3d linux, meaning I have experience pushing the boundaries of compositors. There is discussion going on right now on Gnome mailing lists regarding the failings of Wayland in this regard. There is simply no generic way to generically query a Wayland compositor about positions of windows.
1
u/StraightEnergy8966 7d ago
Oh I see the issue. You're arguing about the default "generic" ways to do "generic" things. Not possibilities about specific apps doing specific things.
1
u/StraightEnergy8966 7d ago
hyprctl -j clients | jq '.[] | select(.mapped and (.xwayland == false)) | {title, at, size}'
1
u/collinalexbell 7d ago
specific apps doing specific things
This isn't about apps. This is about the compositors. There are a handful of major compositors and most of them do not have support for this type of thing because the protocol they are built on has no support for this type of thing. The app itself (Chromium) has an extension API to query this data, but it won't return anything if the compositor doesn't support it (and even if a niche compositor supports it with custom code, it would be likely Chromium wouldn't know how to use that support in it's extension API).
1
u/StraightEnergy8966 7d ago
hyprctl -j clients | jq '.[] | select(.mapped and (.xwayland == false)) | {title, at, size}'
1
u/collinalexbell 7d ago
That is using hyprland's custom API, not a wayland protocol. Chromium isn't going to have code to work with every compositor's control program. Hyprland probably has a few percent of Linux market share... if that.
1
u/StraightEnergy8966 7d ago
Hyprland is Wayland+, it's not custom from the ground up, it's an extension of Wayland. If someone says "Can Wayland do..." and the answer is as simple as "by extending Wayland, yes" then it's a technical yes and a technical no either way. Consider what the person asking wants to hear.
Even before I'd ever heard of hyprland I was developing a year ago browser tab based single source app that know each other's tabs positions in default cachyos environment. I have 4 monitors and each tab knows exactly where and what each other tab contains, how they're laid out, can save the layout, load them, can downgrade to a 3-2-1-laptop view of the same info, etc.
Point being I've literally never faced a barrier with chromium based window positioning awareness and I'm just slop coding. I described it and it one shotted it immediately.
1
u/collinalexbell 7d ago edited 7d ago
Depends on what you mean by a year ago. July 2025 is when KDE Plasma (cachyos default) switched from X11 to Wayland. So if your system was even just a few months old then you were using X11 which does have a standard API to query window position, but is completely beside the point since this discussion is about Wayland.
"Wayland+ / extending Wayland" is a dumb term. Wayland is a protocol. Literally every Wayland compositor extends Wayland. That's how it is used. Hyprland is a wayland compositor that implements it's own features as are all Wayland compositors. Those features seem to include querying window positions, but that doesn't mean even a significant minority of Wayland compositors besides Hyprland do it and it definitely doesn't mean there is a consistent API that Chromium can depend on to do it.
You are arguing against my main point by saying.. "well what about the X11 compositor I used a year ago... or what about the extensions that only hyprland implements". It completely sidesteps my point.
I've literally never faced a barrier with chromium based window positioning awareness
"Works on my machine" is not an argument when it comes to Linux.
1
u/StraightEnergy8966 7d ago
I'm pretty sure "probably a way to work on your machine with Linux" is like the main thing about Linux.
2
u/BeansThe_Cat 9d ago
I am afraid that you are completely and utterly incorrect, did you just make that up
1
u/collinalexbell 8d ago
No. I am correct. I implemented HackMatrix 3d Linux both on X11 and Wayland. You can search for "a generic way to query a wayland compositor about positions of windows " and you will get no results. It simply doesn't exist. The protocols don't support it.
1
u/herocoding 8d ago
The window manager (and layer manager) knows and can be queried.
2
u/collinalexbell 8d ago edited 8d ago
The Wayland protocols has no standard way of querying the position of other windows. Any queries of that type will be window manager implementation specific and most window managers will not implement anything for that purpose.
I'm the creator of HackMatrix 3d Linux which has run on both X11 and Wayland. I have experience in compositors. You don't have to trust me, but you are wrong and are arguing with someone who has experience pushing the boundaries of compositors.
1
u/herocoding 8d ago
There's a high chance that if you drive an European car that your invehicle infotainment system uses Wayland and (borderless) windows and layers are positioned specifically and precisely.
The top left corner, width and height can be queried from the window-manager and layer-manager and applications can precisely position e.g. layers relative and absolute (e.g. media-player, map-viewer, browser).
2
u/collinalexbell 8d ago edited 8d ago
An invehicle infotainment system will operate with a single parent process (ie, the whole infotainment system is fundamentally a single program with respect to Wayland). In this case, `xdg_popup` can be used to relatively position components of a single program. This is how right-click menus work in Chromium. It is also possible (and probably more likely) that the infotainment program itself is a Wayland compositor. In that case it has full control over window placement. That would then be a specific Wayland window manager that can invent it's own protocols external to the Wayland protocols.
Your infotainment system example has very little to do with what we are talking about here, which is generic Wayland support for exhanging window positions across the `xdg_toplevel` surfaces that chromium browsers render in.
Again, you are arguing with someone who has actually engineered a Wayland compositor. Unless you have done the same, you are going to be out of your depth.
2
u/herocoding 8d ago
We use multiple processes. Domains (like multimedia, browser, mapviewer) are isolated processes. There is a separate window-manager and a separate layer-manager in our projects.
There are nice use-cases like drag'n'drop windows (e.g. video playback) across display boundaries (driver- and co-driver-display, rear-left- to rear-right-display).We use single processes e.g. in VxWorks (e.g. in the instrument cluster running a functional safety RTOS).
You are absolutely right, there is no generic Wayland protocol yet upstream.
We needed it in our projects.
We added it to our projects.
It's possible.
Others want it. They discuss about it. They will discuss for a long time.No doubt about your qualification, don't get me wrong.
2
u/collinalexbell 8d ago
Ok. I mean ya, one-off Linux systems can basically do anything. I wasn't contesting that.
1
u/herocoding 8d ago
I mean this is going to be discussed forever, and X11-haters and Wayland-haters and trolls will keep the "discussions" rolling...
It needed to be queried, we added it for specific environments (e.g. automotive) and it's used.
1
u/collinalexbell 8d ago
You are wrong. The "specific environment" you are describing here is likely itself a Wayland compositor implementation. All Wayland compositors know, internally, the positions of their windows. That doesn't mean there is a generic Wayland protocol to query the positions in the compositor from a user program like Chromium.
1
u/herocoding 8d ago
You are absolutely right, there is no generic Wayland protocol to query the position.
9
u/lowclassdandy 9d ago
How can I play with this?