view the rest of the comments
Perchance - Create a Random Text Generator
โ๏ธ Perchance
This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.
Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)
This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.
See this post for the Complete Guide to Posting Here on the Community!
Rules
1. Please follow the Lemmy.World instance rules.
- The full rules are posted here: (https://legal.lemmy.world/)
- User Rules: (https://legal.lemmy.world/fair-use/)
2. Be kind and friendly.
- Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)
3. Be thankful to those who try to help you.
- If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)
4. Only post about stuff related to perchance.
- Please only post about perchance related stuff like generators on it, bugs, and the site.
5. Refrain from requesting Prompts for the AI Tools.
- We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (
text-to-image-plugin
andai-text-plugin
) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?" - See Perchance AI FAQ for FAQ about the AI tools.
- You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
- We will still be helping/answering questions about the plugins as long as it is related to building generators with them.
6. Search through the Community Before Posting.
- Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.
Thanks! I will try to find more generators affected by this bug and maybe start messing around with that blank page (revisions worked on 2 of my easter egg generators so far). But for now, here's a little snippet that I would use to check if a generator's revision is affected by the bug:
Which in this case, I just ran on my milestone announcement page, and it returned this:
(Also @VioneT@lemmy.world, @Alllo@lemmy.world, @eatham@aussie.zone and others, if you wanted to contribute by finding some buggy revisions in your generators by running that in the console and found errors like that, that'll be very helpful.)
Seems like you have a good point. ๐ I will try this with my milestone announcement page after my preparation with it is fully done.
i basically have no idea any of this but will look at what all this is and do it tonight because you say it will be helpful (tonight here is like 5 hours from now)
@BluePower@sh.itjust.works I just went through every one of my generators and got the latest revision without issue.
also i wasn't able to reproduce the error on perchance.org/blank
i guess i can't help that i know of. sorry :)
at least im making cool things like i hope u are too!
Nice! At least you're trying to :)
Here is probably a smaller code to check, also it wouldn't stop at the first malformed:
You can also just copy and paste it on the console directly. Just need to load revisions first.
It seems the
/hub
has the last '101' revisions onmodelTextPatches
to be malformed. TheoutputTemplatePatches
didn't throw any errors. Looking at the other pages that I have, mostly previous revisions are malformed. The date it started appearing (at least on my revisions onai-generated-realistic-portraits
) is Jan 8, 2024 about 10:38:43 AM UTC, but about 10:38:34 AM the revisions are still okay. On thehub
it is also Jan 8, 2024 about 11:30:42 AM UTC.EDIT: It seems to be only generators that were updated on Jan 8 before 12:03:58 PM and after 10:38:34 AM seems to have problems on my end.
That's interesting. I didn't know the hub also has the same revisions problem. I've been tinkering with that code for hours and this is what I made:
There we go! It's a greatly enhanced version of the checker tool. To reduce all the wait, the checker first processes a chunk of data, then if that chunk of data has been checked successfully, then the next chunk will be checked. (But still, if the revision data has around tens of thousands of characters it's going to take seconds to process)
The process roughly looks like this:
The checker will take a part of the data and then
decodeURI
's them. Then if it's successful, another chunk is also checked:And there, once it's
URI malformed
time, the checker stops for checking further chunks. Additionally, the logger not only throws the error, but also locates the chunk location where the error is throwed and shows when the check happened in time. You can also set on which index the checker should start checking withstartFrom
for easier debugging.Additional note: While testing, I also found that other "suspicious" (invalid) characters (including
%9F
) and the single percentage%
are also affecting this whole revisions problem.(Also I might create a whole "utility" generator out of this so more people can contribute to this ๐)
On that note, I duplicated the
hub
and deleted the old one, it did resolve the revisions problem (though the view count reset).What? With a hub that had over a thousand views? That's remarkable.
Also @perchance@lemmy.world, if there's a way to backup and erase all the revisions somehow ๐ค
Here is a code that also outputs the Date of the Revision as well as the Text that was throwing the error neatly in a table. It seems ONLY the
modelTextPatches
are throwing the malformeds.Oooh nice! I'll test that later, and I'll improve it even more when needed.