Live data from Hacker News

Show HN: Draw a fish and watch it swim with the others

drawafish.com

81–90 of 247 posts

Re: Show HN: Draw a fish and watch it swim with the others

#81

Does not work for me on desktop Firefox. When I press the "make it swim!" button, there's an error in console: "Uncaught (in promise) Error: Fish model not loaded"

I could submit a fish on desktop Firefox, but apparently the fish died shortly thereafter. Voting is broken though.

EDIT: Nevermind! Now there's a problem uploading a fish, and the local aquarium is broken, so I can't view the previous one, either. It's a nice idea, but I really wish it worked better with Firefox (being on the web and all).

Re: Show HN: Draw a fish and watch it swim with the others

#83
post #39

The website is great! > I built a basic CNN trained against penises After seeing it in action, my second thought (first was just watching my fish) was that I was amazed at the good behavior of the users because I would have expected a lot of penises floating around. Now I understand. Nicely done!

Well apparently it wasn't trained against asses, since it let me write "Ass" on my fish :P

Re: Show HN: Draw a fish and watch it swim with the others

#84

Nice, I got my upside down penis fish past the filter! Although, once it was swimming it did look very much like a fancy guppy. I don't think anyone would recognize it, but I still feel smug about "beating" the machine.

It's OK at filtering out penises, next step is to filter out all the flags...

Re: Show HN: Draw a fish and watch it swim with the others

#86
post #77
post #73

Earlier quoted context omitted.

I don't let the client decide whether the submission needs moderation :) There's a very slightly different model in the backend that sends things to the mod queue. Strings are also sanitized there. But copilot really wanted to add all that logic to the frontend too and I thought it was funny

You still should not be building HTML and JS using string interpolation.

Absolutely! I've removed all references of HTML and JS using string interpolation.

(jk)

This is definitely a drawback with with vibe-coding. I never really write like HTML5 style code - at work I always use typescript with heavy ESLint, so never have to worry about this.

I figured the string sanitization in the backend would take care of any XSS vulns, which was my main concern. But I will have to read into the dangers of string interpolation which I admit I do not remember too much about (outside of the XSS stuff I tried to mitigate).

Thanks for giving the opportunity to learn... :)

Re: Show HN: Draw a fish and watch it swim with the others

#87
post #70

> exercise in vibe-coding The code shows it... Your escaping routine seems OK, but you really __should not__ be building HTML and JS(!) using raw string interpolation. Or letting the client decide whether the submission needs moderation.

To be fair, everything on the client is raw string interpolation. It's only secure if you comprehensively vet everything once it's on the server.

Re: Show HN: Draw a fish and watch it swim with the others

#88
I keep getting this error on both Safari and Firefox:

Uncaught (in promise) Error: Fish model not loaded verifyFishDoodle https://drawafish.com/src/js/app.js:514 https://drawafish.com/src/js/app.js:170 EventListener.handleEvent* https://drawafish.com/src/js/app.js:168

Edit: Never mind, I had to wait till the model loaded. Took some time though. Fun project nevertheless!

Re: Show HN: Draw a fish and watch it swim with the others

#89
post #39

The website is great! > I built a basic CNN trained against penises After seeing it in action, my second thought (first was just watching my fish) was that I was amazed at the good behavior of the users because I would have expected a lot of penises floating around. Now I understand. Nicely done!

There are some fish decorated with swastikas floating around
Post reply on HN