HNHacker News
TopNewBestAskShowJobs

stankot

1,152 karma · joined March 9, 2015

My personal website - https://muffinman.io
submissionscomments
stankot··on Show HN: Pulsar, micro creative coding playground
You are not bothering me, this is great stuff. I agree, iframe is probably a way to go (sites like codepen or openprocessing are also using it), but I wanted to keep the scope under control, while trying to minimize the potential damage. The worker plus list of disallowed strings is what I came up with as a compromise.

The 7-digit counter is mind blowing, I'll add it to the list of examples!

Thank you!

stankot··on Show HN: Pulsar, micro creative coding playground
Nice one! Yeah, it is quite tricky to protect from everything, I'll try to patch this and similar exploits, thanks for bringing it up.

At least the exploit doesn't work until you start changing the code.

EDIT: Patched it by checking for backslashes and the word "constructor".

stankot··on Show HN: Pulsar, micro creative coding playground
Hey, author here. I'm really glad to see this getting some traction on HN, it is one of those projects that really brings me joy.

It is inspired by a project that I saw on HN a while ago. I wasn't able to find it again, so I made my own version. I swear, only after finishing Pulsar I managed to find https://tixy.land/ again.

As a bonus, I wanted to run these animations on my DIY LED frame. Check out the video:

https://github.com/Stanko/pulsar/tree/dev#led-retro-frame

Here are a few technical details:

It is built in TypeScript and open source. User code is executed in a web worker to minimize the risk of malicious use (tbh I'm proud of the solution, and I find it quite nifty). Initially, I used to render everything as an SVG, but in order to create GIFs for the LED frame, I switched to canvas. Not to mention that SVG gave me a few headaches which I'll cover in a blog post (if I ever write one). The syntax highlighter is a trick I found on Stack Overflow. The textarea is transparent, and as you type in it, I take the code, highlight and copy it into a div which overlays the textarea.

It was really fun to build and I hope you had some fun playing with it.

I made it around last new year's eve, so here is a simple animation of a Christmas tree:

https://muffinman.io/pulsar/?grid=classic&animate=both&code=...

stankot··on Show HN: Pulsar, micro creative coding playground
Love this one, I'll add it to the examples!
stankot··on Ask HN: What's the coolest physical thing you've made?
Oh boy, flip-disc displays are really nice, I would love to get my hands on one.
stankot··on Ask HN: What's the coolest physical thing you've made?
I'm a sucker for old games and good pixel art and I've built a pixel art frame powered by a LED matrix. It is not the most impressive thing I've built, but it is the one that brings me the most joy.

Videos:

https://raw.githubusercontent.com/Stanko/retro-frame/dev/ret...

https://raw.githubusercontent.com/Stanko/retro-frame/dev/ret...

I wanted something that has a feel of an art object and sits on the shelf, rather than being a smart object that you can control with an app.

The whole thing is open source and you can make it yourself:

https://github.com/Stanko/retro-frame

Disclaimer - This was my first ever python project and I just made it work. ATM a friend of mine is helping me refactor everything. Repo also needs images of a new wooden frame I made.

Edit: Formatting.

stankot··on Ask HN: Could you share your personal blog here?
Ha, I'm a big Zappa fan!

Fun story, while we were in high school, my friend's computer broke down. All of his music was on it, so I borrowed him a bunch of CDs. He really liked Zappa's "Strictly Commercial" compilation and he became obsessed. Fast forward a couple of years and he is the one sending me Zappa's bootlegs and weird recordings which I would probably never heard otherwise. He even created a compilation for me, which he named "Almost Commercial" and I cherish it dearly :)

And thanks for the video, they sound really good!

stankot··on Ask HN: Could you share your personal blog here?
Thank you!

I'm proud of my scribbles and the whole process, but I didn't expect the post would explode on HN. It really made my day.

stankot··on Ask HN: Could you share your personal blog here?
https://muffinman.io/

I've been writing for a while now. Mostly front-end development, random experiments and creative coding.

My most popular post that was on the first page of HN earlier this year: https://muffinman.io/blog/draw-svg-rope-using-javascript/

I'm pretty proud of my generative, pen plotted drawings: https://muffinman.io/art/

And one of my favorites: https://muffinman.io/blog/breaking-down-krypton/

Edit: Typo.

stankot··on Breaking down Krypton (2022)
Author here, I'm really glad to see this here, wasn't expecting it to surface on HN.

I started drawing with code a couple of years ago, and I absolutely love everything about it. It brought fun back into programming for me.

Since then, I try to get more people into it. My main argument is that it isn't as hard as it looks like. Often code will be pretty simple and straight-forward but result in visually pleasing images. That's why I wrote a few of these posts [1] and had a talk or two about my drawings.

I'll be happy to answer any questions.

[1] https://muffinman.io/archive/#generative

EDIT: Typos

stankot··on Draw SVG rope using JavaScript
I'm not sure what is happening. I can replicate that behavior only when I disable javascript. If that case you can't close it as it relies on the url hash.

edit: typo

stankot··on Draw SVG rope using JavaScript
Thank you very much, it means a lot!

Plotting is the reason I always try to generate vector images. I'll probably try to plot a drawing with these ropes. But I would like to add some kind of shading and to figure out how to tie knots.

stankot··on Draw SVG rope using JavaScript
Thank you! I'm using Zola[1] static site generator. Interactivity is is all done in plain JavaScript, no React in this post.

[1] https://www.getzola.org/

stankot··on Draw SVG rope using JavaScript
Thank you, I'll take care of it! It seems I broke it with HTML I'm using directly in markdown files.

EDIT: Fixed it, thanks again!

stankot··on Draw SVG rope using JavaScript
Can you please tell me which browser/os are you using? I'll look into it, although it works my laptop/phone.

P.S. Unfortunately I had some bad experiences with leaving contact info public.

stankot··on Draw SVG rope using JavaScript
Ha, you are completely right. I didn't think about it at all.

I've kept the interactive image short on purpose, so it doesn't cover too much content. Then I tried to squeeze as much movement in that short area.

I may go back and update examples a little bit.

stankot··on Draw SVG rope using JavaScript
Author here.

Woah! This kinda exploded, thank you so much for the kind words!

Lately, I'm trying to add more interactivity to my posts. Mainly inspired by amazing work of Bartosz Ciechanowski [1].

I started drawing with code a few years ago and completely fell in love with it. Problems like this one scratch my itch for creative programming.

I hope some of my posts will inspire people to try making pictures using code, just for the sake of it. Programming should be fun :)

[1] https://ciechanow.ski/

edit: typos

stankot··on Tidbyt hardware display device: a review
I won't judge, especially as I don't know cpp either :)

It seems great and way more user friendly than what I have. I might steal your code for the next iteration.

I'll write a proper readme and make my repo public today.

EDIT: Here it is: https://github.com/Stanko/retro-frame

stankot··on Tidbyt hardware display device: a review
Same story with me and python, so don't worry :) I'll make the repo public during the next week.

Diffuser also makes a difference as the controller I'm using doesn't allow me to control the brightness. I should really write a blog post :D

stankot··on Tidbyt hardware display device: a review
Love it! I did a similar thing, 64x64 pixels with a LED diffuser. Everything is packed up in the IKEA picture frame: https://imgur.com/a/cLXGWWd

I'm lazy, but I plan to do the full write up and to open source everything. I use it to display pixel art, and during the night it automatically switches to the clock mode.

I love yours as well and it would be great if you can put the code on GitHub. Mine is using ESP32 as well (Adafruit's MatrixPortal M4). It is running Circuit Python though. I love it dearly and I played with an idea of making it as a product.

stankot··on Ask HN: Share your personal site
https://muffinman.io

My longest living website of any kind. Technical blog, mostly frontend and javascript, but recently I created a section for my generative, pen plotted art.

It is made with Zola and deployed on GitHub Pages. Design is my own, I think the fourth iteration.

stankot··on Interactive Generative Art
Shameless plug, I have made one of these interactive toys as well:

https://neon.muffinman.io/

I fell in love with generative art this year, and it became my favorite thing to do. Neon is the first presentable thing I made.

stankot··on Ask HN: How to self-host comments on your otherwise static blog?
I successfully use Staticman for around three years now. It works really well.

I wrote a short post how to set it up on heroku to avoid GitHub quotas problem: https://muffinman.io/running-staticman-on-heroku/

stankot··on Show HN: Letters from Sarajevo, web adaption of the book
Hey HN,

I would love to share one small, rather personal project of mine - it is a web adaptation of the book my brother wrote, using authentic letters our father sent us while being stuck in Sarajevo during the war in the nineties.

Thank you!

stankot··on Show HN: Breathe – Generative Art Piece
From my experience, users love it. It is really easy to loose "that one perfect image" and keeping everything in history helps.
stankot··on Show HN: Breathe – Generative Art Piece
Author here, another of my generative art projects. I'm still pretty new to the whole generative art thing.

Please note that "Low Poly" mode is on by default - it improves performance and allows you to see changes in realtime. When you are satisfied with the results, you can switch it on to download smoother image.

As you play with parameters, unique URL will be generatred for easy sharing.

Any feedback is welcome! <3

stankot··on Show HN: Metaballs, Generative Art Piece
Author here, this year I started with generative art, and I'm absolutely loving it. This is my latest piece, and I wanted to share it with you.

The output are vector images which I plan to pen plot (I ordered AxiDraw plotter) and make them available on my site.

For those interested in how it works, I wrote a blog post: https://muffinman.io/metaballs-generative-art/

Cheers!

stankot··on Show HN: Neon – Generative art piece made using 2D vector field
That makes sense. For now there is a reset button at the bottom.
stankot··on Show HN: Neon – Generative art piece made using 2D vector field
Thanks! I know it can be cumbersome to navigate a long history, but people generally love this feature. Because it is easy to loose "the perfect" image while playing with controls. This allows you to click back couple of times and find it.

As for how it works, I plan to do a full write up on my blog. But I'll give you a short summary.

- I generate a random vector field (https://en.wikipedia.org/wiki/Vector_field). It is not completely random, I pull them all slightly to the right, as chaos is rarely visually pleasing.

- Then I generate random starting point for each line.

- For each point, I find all vectors in certain radius, and apply their force to the dot. The further away the vector is, the weaker force applies to the point. This will give me next point.

- I repeat the process for the new point, until line is out of bounds or line reaches length of 100 point.

- Now line looks like a array of points (x, y coordinate pairs). Using these points, I draw smooth bezier curve.

That sums it up I think. The whole thing has some random aspects, params controlled by the user and some I tweaked how I like them to give what I think is visually pleasing. Try enabling debug mode and playing with controls.

This codepen is my initial exploration, the code is very similar to the final think and it might be easier to understand.

https://codepen.io/stanko/pen/rNavBvN

EDIT: Formatting.

stankot··on Show HN: Neon – Generative art piece made using 2D vector field
Thank you!

Honestly, I really like "neon" color chaos. But it shouldn't be too hard to change. If you want to try it locally, you only need to change few lines responsible for color generation:

https://github.com/Stanko/neon/blob/master/src/utils/generat...

"rng" property is a seeded random generator you can use instead of Math.random

I'll add a short section in readme about running it locally.

← PreviousPage 2 of 3Next →