@BluePower@sh.itjust.works avatar

BluePower

@BluePower@sh.itjust.works

I make generators on Perchance.org and do a bunch of other cool things.

Links:

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Tip: If your title and/or $meta.description doesn't include the specific keywords/terms that people are likely to type in a web search, then it makes it much harder for people to find your generator

For example, if you’ve made a world building religion generator, and you title it “The Arch Bible” or something like that (i.e. something that’s more of a “brand” than a “description”), then people won’t be able to use a web search engine to find it unless they already know its name. In other words, people...

BluePower, (edited )
@BluePower@sh.itjust.works avatar

That’s what I’ve been thinking for a long, long while, and finally explained in a single post. And that’s why the AI generators out there have hundreds of thousands or even millions of views, surpassing the plugin pages (and even the welcome page!), that I always wonder, “why do these generators have such long description? Are these ‘really special’ generators?”

But what about generator pages that has no $meta.description but laid out the page’s content or source code as a description in search results?

https://sh.itjust.works/pictrs/image/21893a94-784b-4a90-9ce6-64283c22951f.png


Now still questioning about why do my simple flag generator can surpass even my full-featured name generator just recently… 🤔

BluePower,
@BluePower@sh.itjust.works avatar

That’s one of the natures that the generators page have, which is displaying the full link rather than the $meta.title. But we could have an option to display the latter, and then put the full link on top as a small text, so it’ll look even more appealing to Perchance browsers, not just in search results.

https://sh.itjust.works/pictrs/image/902d414f-1cb8-420a-be96-1cb3409188d8.png

The very first reiteration of the Power Generator Manager. (perchance.org)

I’ve sort of quietly released my very basic, very simple, very first reiteration of the Power Generator Manager, like when this is was an ordinary minimal generator that I created the original base of the hub page and then clicking on the save button, which eventually lead to the creation of it. This was done in the...

The Comments Plugin's notifications feature + additional caveats, tips and other things

Remember when the Dev @perchance made a post months ago - lemmy.world/post/5716741, where they had just announced that feature for the comments-plugin? I was about to reply to that post, but I can’t find it on my home instance, so I decided to make a new post to address something about that feature....

BluePower,
@BluePower@sh.itjust.works avatar

@VioneT I think you can add another point that you can also do multiple rules on notifications (like bob~>general|bobby~>general) as the Dev mentioned in the original post, in the Notifications (Experimental) tooltip in the Chat tab on the Hub.

Also pinging @perchance.

BluePower,
@BluePower@sh.itjust.works avatar

Thanks Dev! I think the auto updating feature worked again.

BluePower,
@BluePower@sh.itjust.works avatar

Also worth mentioning that you can also do *~>ch1|*~>ch2|*~>ch3 for receiving notifications on multiple channels, and even combine them with multiple words (*~>ch1|hi~>ch2|bob~>ch3).

[Bug?] Equals in dynamic odds warning, although I'm not assigning a value into anything

The last time I checked my Example Page Generator, I’ve found some warnings that says that I have some strange dynamic odds in the list code, even though it wasn’t all about assigning variables in those things. All I was trying to do is to filter the examples based on the user using Perchance syntax (for reference):...

BluePower, (edited )
@BluePower@sh.itjust.works avatar

Interesting plugin! I might as well use this for my generator hub page, and also its preview version, because it needs to import the base source of the generator manager (power-generator-manager) to be able to retrieve and sync the generator lists and the “news & updates” from that, so I don’t have to change it in case I needed to change anything in the gen list (e.g., the description or, if I had released a new generator, I’d need to add that generator to the list). And that’s to reduce some loading time.

https://sh.itjust.works/pictrs/image/b1a13129-ca56-4ef5-ad95-0cab9aae706d.png

BluePower,
@BluePower@sh.itjust.works avatar

I also don’t regret making my Random Mixed-up Flag Image Generator as well as the Counter Lab, which is pretty much some of the only generators with AI plugins that I’ve ever made.

(Not to mention The Super Long Name and Chat in the Smartwatch also have a text-to-image-plugin built into it!)

BluePower,
@BluePower@sh.itjust.works avatar

Yeah, same reason with my random flag generator, which is why I opted in to optimize those generators for discoverability (and probably will surpass the views of my name generator sooner 😆). Also, there’s probably not many flag generators out there (only some national flag generators, not a completely abstract one) at that time, so I decided to make one.

It’d be cool if you replaced the two names at the top with two <input>s and then add a “randomize” button next to those two inputs.

That sounds a great update! I’m not sure how that’d be implemented yet, but surely this will come out as an option in the generator, users could choose whether to select their own countries to combine from or let the generator randomize it automatically (default behavior), maybe through a button that would be placed around here:

https://sh.itjust.works/pictrs/image/7e33faa7-6615-4980-bf00-1da7cb50a26f.png

BluePower, (edited )
@BluePower@sh.itjust.works avatar
BluePower, (edited ) to perchance
@BluePower@mastodon.social avatar

[Bug] Downloading revisions not working

I made a similar post about this one (https://lemmy.world/post/11134086) and it happened again, and hopefully the Dev can notice. (ping please)

Here's the error that Perchance throws when I try to download revisions from https://perchance.org/power-generator-manager-10k-milestone:

Uncaught URIError: URI malformed
at decodeURI (see image)

EDIT: After some later investigation, I've found out that this does NOT affect earlier revisions (see this comment: https://lemmy.world/comment/8770044)

@perchance

BluePower,
@BluePower@sh.itjust.works avatar

Update regarding on the revisions: The bug seems to affect later revisions, and not the entire revision list. And here’s what I’ve done so far.

When trying to download some earlier revisions in power-generator-manager, I have to say that revisions only made after 12 January 2024, 23:31:11 UTC+7 (after index 863) are affected by this bug. I even ran this line of code in the console to get a decoded URI of the latest model patch:


<span style="color:#0086b3;">decodeURI</span><span style="color:#323232;">(diffStuff._patchesToRevision(diffStuff.modelTextPatches, </span><span style="color:#0086b3;">1617</span><span style="color:#323232;">))
</span>

And that returned the exact same error, URI malformed. So that’s a problem with the encoded text on each specific revision.

But my investigation doesn’t stop there. To see if there’s a single character that triggers the entire URI corruption, I also compared those raw revision data of index 863 and 864, decoded manually, in a text comparison app, and I’ve finally found the culprit, in line 204:

Revision Sat Jan 13 2024 13:09:52 GMT+0700 (GMT+07:00):


<span style="color:#323232;"><</span><span style="color:#63a35c;">li</span><span style="color:#323232;">><</span><span style="color:#63a35c;">b</span><span style="color:#323232;">>The generator manager is getting another big update!</</span><span style="color:#63a35c;">b</span><span style="color:#323232;">> ... Scroll down past the end of the announcement to see the full changelog of the update!</</span><span style="color:#63a35c;">li</span><span style="color:#323232;">>
</span>

Revision Fri Jan 12 2024 23:31:11 GMT+0700 (GMT+07:00):


<span style="color:#323232;"><</span><span style="color:#63a35c;">li</span><span style="color:#323232;">><</span><span style="color:#63a35c;">b</span><span style="color:#323232;">>The generator manager is getting another big update!</</span><span style="color:#63a35c;">b</span><span style="color:#323232;">> ... Scroll down past20the announcement to see the full changelog of the%2!</</span><span style="color:#63a35c;">li</span><span style="color:#323232;">>
</span>

And there it is, the %2 that triggered the URI malformed problem. There was apparently some sort of a glitch with the diffStuff._patchesToRevision() function when it tries to parse the raw patch data into a revision (that could be on the concurrent save requests you’ve mentioned).

I then tried the same procedure in the latest revision of the hub page and found that the %2 character started spreading around the generator code multiple times. Not only that, but parts of the entire data are also scrambled pretty bad, too. (This doesn’t happen on unaffected revisions!) So your statement on “your current revisions are corrupted” is kind of true.

And now, every time I had to get a revision, I’d have to get the patch directly with that specific approach, manually decode it, transfer it into a notepad, and then saving it if I wanted to (unless there’s a way to fix that URI corruption thing).

And yes, I did check the outputTemplatePatches and everything in it is okay, no corruption whatsoever. Even to the latest one 🙂

BluePower, (edited )
@BluePower@sh.itjust.works avatar

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:


<span style="font-weight:bold;color:#a71d5d;">for </span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">let </span><span style="color:#323232;">i </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">0</span><span style="color:#323232;">; i </span><span style="font-weight:bold;color:#a71d5d;">< </span><span style="color:#323232;">diffStuff.modelTextPatches.length; i</span><span style="font-weight:bold;color:#a71d5d;">++</span><span style="color:#323232;">) {
</span><span style="color:#323232;">  </span><span style="color:#0086b3;">decodeURI</span><span style="color:#323232;">(diffStuff._patchesToRevision(diffStuff.modelTextPatches, i));
</span><span style="color:#323232;">  </span><span style="font-style:italic;color:#969896;">// when executed, the console tries to evaluate that so that's why it'll get an error if the revision's corrupted
</span><span style="color:#323232;">  </span><span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(</span><span style="color:#183691;">"modelText: " </span><span style="font-weight:bold;color:#a71d5d;">+ </span><span style="color:#323232;">i);
</span><span style="color:#323232;">  </span><span style="font-style:italic;color:#969896;">// count COUNT COUNT
</span><span style="color:#323232;">}
</span><span style="font-weight:bold;color:#a71d5d;">for </span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">let </span><span style="color:#323232;">i </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">0</span><span style="color:#323232;">; i </span><span style="font-weight:bold;color:#a71d5d;">< </span><span style="color:#323232;">diffStuff.outputTemplatePatches.length; i</span><span style="font-weight:bold;color:#a71d5d;">++</span><span style="color:#323232;">) {
</span><span style="color:#323232;">  </span><span style="color:#0086b3;">decodeURI</span><span style="color:#323232;">(diffStuff._patchesToRevision(diffStuff.outputTemplatePatches, i));
</span><span style="color:#323232;">  </span><span style="font-style:italic;color:#969896;">// same with this too ^^
</span><span style="color:#323232;">  </span><span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(</span><span style="color:#183691;">"outputTemp: " </span><span style="font-weight:bold;color:#a71d5d;">+ </span><span style="color:#323232;">i);
</span><span style="color:#323232;">}
</span><span style="font-style:italic;color:#969896;">// you'd have to load the revisions in order for it to work, and for generators with lots of revisions, it'll probably take longer to finish the check
</span>

Which in this case, I just ran on my milestone announcement page, and it returned this:

https://sh.itjust.works/pictrs/image/815bb502-6fb7-4958-ba43-dece51aa108c.png

(Also @VioneT, @Alllo, @eatham 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.)

Why not fork it and start with a fresh? That will reset your revisions.

Seems like you have a good point. 🙂 I will try this with my milestone announcement page after my preparation with it is fully done.

BluePower,
@BluePower@sh.itjust.works avatar

Nice! At least you’re trying to :)

BluePower, (edited )
@BluePower@sh.itjust.works avatar

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:


<span style="color:#323232;">function checkForMalformedRevs(patch, loglabel, startFrom) {
</span><span style="color:#323232;">  let text;
</span><span style="color:#323232;">  let dateRegex = [/^.* ([0-9][0-9]:[0-9][0-9]:[0-9][0-9]) GMT+.*/g, "$1"];
</span><span style="color:#323232;">  console.log('[' + loglabel + ']', Date().replace(/ (GMT+.*)/g, ""), 'Check Started.');
</span><span style="color:#323232;">  patch.forEach((a,i) => {
</span><span style="color:#323232;">    if (i < startFrom) return;
</span><span style="color:#323232;">    let pi = diffStuff._patchesToRevision(patch, i);
</span><span style="color:#323232;">    let x = 0;
</span><span style="color:#323232;">    let offset = 0;
</span><span style="color:#323232;">    try {
</span><span style="color:#323232;">      for (x = 0; x < pi.length; x += 100) {
</span><span style="color:#323232;">        offset = (!!pi.substring(x, x + 100).match(/%.$/g) * 1) + (!!pi.substring(x, x + 100).match(/%$/g) * 2); // checks if there's any "chopped" URI characters at the end of the chunk to prevent `URI malformed` errors just because of that
</span><span style="color:#323232;">        text = decodeURI(pi.substring(x, x + 100 + offset));
</span><span style="color:#323232;">        text = '';
</span><span style="color:#323232;">        x += offset;
</span><span style="color:#323232;">        offset = 0;
</span><span style="color:#323232;">      }
</span><span style="color:#323232;">      console.log('[' + loglabel + ']', Date().replace(...dateRegex), 'Checked:', i);
</span><span style="color:#323232;">      x = 0;
</span><span style="color:#323232;">    } catch (err) {
</span><span style="color:#323232;">      console.error('[' + loglabel + ']', Date().replace(...dateRegex), 'Error:', i, 'at chunk', x + '-' + (x + 100 + offset), 'of', pi.length, err);
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">  })
</span><span style="color:#323232;">  console.log('[' + loglabel + ']', Date().replace(/ (GMT+.*)/g, ""), 'Check Complete.');
</span><span style="color:#323232;">}
</span><span style="color:#323232;">checkForMalformedRevs(diffStuff.modelTextPatches, "modelTextPatches");
</span><span style="color:#323232;">checkForMalformedRevs(diffStuff.outputTemplatePatches, "outputTemplatePatches");
</span>

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:


<span style="color:#323232;">"generatorStats%20=%20%7Bimport:generator-stats-plugin%7D%0%0Atitle%0A%20%20Power%20Generator%20Manager%0A%0A%0A%0Ann"
</span><span style="color:#323232;">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ < checking
</span>

The checker will take a part of the data and then decodeURI’s them. Then if it’s successful, another chunk is also checked:


<span style="color:#323232;">"generatorStats%20=%20%7Bimport:generator-stats-plugin%7D%0%0Atitle%0A%20%20Power%20Generator%20Manager%0A%0A%0A%0Ann"
</span><span style="color:#323232;">                                                  ~~~~~~~~!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ < checking
</span>

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 with startFrom 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 😊)

BluePower,
@BluePower@sh.itjust.works avatar

What? With a hub that had over a thousand views? That’s remarkable.

Also @perchance, if there’s a way to backup and erase all the revisions somehow 🤔

BluePower,
@BluePower@sh.itjust.works avatar

Oooh nice! I’ll test that later, and I’ll improve it even more when needed.

BluePower, to perchance
@BluePower@mastodon.social avatar

[Suggestion] Blocking certain words in comments, not just users in the Comments Plugin

So, there's already a feature to block specific tags so comments with those tags won't show up anymore. But what if you could also block comments based on keywords (even if they're sent from different tags)? Also, there should be a separate "unblock all" command for blocked users and words.

Please ping the Dev so they know about this.

@perchance

BluePower, (edited )
@BluePower@sh.itjust.works avatar

That’s what I’m talking about. I could set my own word filters, and everyone else can set their own word filters as well, and they can be different for each user. Kind of like a combination of bannedWords and the user blocking feature. 🙂

I’m not as sure how it would affect your conversations since if they messaged with a filtered word, you might not have the correct context to reply to.

Also, for this, there should be a command to show/hide messages containing the word filter (that marked with a specific flag). It’s like the suggested “unblock all” command for words I previously mentioned in the post but the defined blocked words do not reset. With that, I’ll be able to look up and still see those replies with the word filters.

BluePower, to perchance
@BluePower@mastodon.social avatar

Tampering with generatorName

I have recently discovered this but apparently you can tamper with the generatorName variable to use another generator's name despite that it's a different generator name, in other words, identify that as another generator. This could be used to play with some sort of things that you can't in a normal circumstance, like accessing the comments from another generator, even from deleted or renamed generators.

@perchance

BluePower,
@BluePower@sh.itjust.works avatar

Kind of the same thing happened to me when commenting on my Popularity Achievement generator. It loses the admin tag when I refreshed the comments frame.

https://sh.itjust.works/pictrs/image/3dc59d7f-69de-4486-b299-baa3f94d158c.png

BluePower,
@BluePower@sh.itjust.works avatar

Has anyone noticed this already? Pinging @perchance one more time.

BluePower,
@BluePower@sh.itjust.works avatar

I don’t find the adblocker thing as a big issue on my main browser (Edge) other than the restored and private Firefox tabs would always misremember that it has detected adblockers. It pops up the message and told me that the generator page will refresh every 60 seconds, after waiting for a couple minutes.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • rosin
  • thenastyranch
  • GTA5RPClips
  • tester
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • kavyap
  • JUstTest
  • cisconetworking
  • khanakhh
  • normalnudes
  • osvaldo12
  • cubers
  • tacticalgear
  • Durango
  • ethstaker
  • modclub
  • anitta
  • provamag3
  • Leos
  • lostlight
  • All magazines