Live data from Hacker News

Fishdraw: Procedurally Generated Fish Drawings

fishdraw.glitch.me

21–30 of 91 posts

Re: Fishdraw: Procedurally Generated Fish Drawings

#21
post #12

Why does this use let and var together? Was I (not a modern js expert) wrong to think var is considered obsolete? Is it because OP wanted to use var's scoping rules?

var is not obsolete. You still need it sometimes for scoping reasons.

Could you give an example? It seems like any "var" could be replaced with "let" at a different scope.

Re: Fishdraw: Procedurally Generated Fish Drawings

#22
post #19

Love the generated art projects. I just want an art ‘frame’ (display with small computer) that generates new art every so often. Put together a few of the various art ML projects into one product for this.

with a button where you can click it to save particularly genius results that appeal

Re: Fishdraw: Procedurally Generated Fish Drawings

#23

Why does this use let and var together? Was I (not a modern js expert) wrong to think var is considered obsolete? Is it because OP wanted to use var's scoping rules?

It's almost certainly from copy-pasted code from other sources. The Perlin Noise section at the top is not original code at least - though I can't find an original source.

https://github.com/processing/p5.js/blob/8213eecccdff510015e...

Re: Fishdraw: Procedurally Generated Fish Drawings

#25
post #12

Why does this use let and var together? Was I (not a modern js expert) wrong to think var is considered obsolete? Is it because OP wanted to use var's scoping rules?

var is not obsolete. You still need it sometimes for scoping reasons.

You don't need var, you don't need it's weird scoping behavior.

Re: Fishdraw: Procedurally Generated Fish Drawings

#28
post #24
post #19

Love the generated art projects. I just want an art ‘frame’ (display with small computer) that generates new art every so often. Put together a few of the various art ML projects into one product for this.

Hacked kindles work well for this.

Kindles are too small and have no color. I want a large colorful framed picture. E-ink would be awesome but that’s not cheap for color displays and def not for large ones.
Post reply on HN