wthit56

joined 2 months ago
[–] wthit56 1 points 2 days ago

Oh interesting. Maybe they use a different term, or auto-sticky anything from a particular user, or something. Weird...

[–] wthit56 1 points 2 days ago (2 children)

Could we maybe have fewer of these stickied posts on here? Scrolling past 4 of these gigantic posts every time just to see what's actually newly posted on here is kinda tiresome. Maybe have a time limit on how long they are stickied at least?

I don't know for sure, but my guess is people who use this forum are passionate about Perchance on a deeper level and want to stay up-to-date, so probably check here fairly often. So just posting normally should be noticed by most people anyway. Or stickying for just a day or two should let most people find that post. And only if it's some larger change maybe?

You're in charge of course. Just putting it out there.

(Also if there's some way of making Lemmy not make link posts HUUUUUUUUGE that'd be great.)

[–] wthit56 1 points 2 days ago

Cool cool. Do you have any sort of testing set up for perchance? Could be useful for making sure things like this don't break capabilities.

[–] wthit56 1 points 3 days ago

Oh I see. I'll keep these things in mind for people that ask.

[–] wthit56 1 points 3 days ago

Ah, got it. So there's a fix in place, that will slowly roll itself out to each server over time? Cool, will paste links here if/when I find them.

[–] wthit56 1 points 3 days ago (2 children)

Ah great! Those were both pet peeves of mine, but I thought they're probably way too deeply embedded to change at this point. Thanks for this! I'll let you know if I find any new bugs from it. 👍

[–] wthit56 2 points 4 days ago (1 children)

Perchance is built on JS. Code blocks are [JavaScript expressions]. Functions just have fn() => JavaScript code in them. Plus, you could just put a script tag in the HTML of the page and put JS direct in there if you wanted to. So yeah, you can do loops as usual. 👍

This also means you can call something like the image generator with just a simple js object, normal strings, and so on. Which can make things a lot easier and encapsulated.

Personally, I'd write the image function as not changing values, and just creating the needed HTML and returning that. But you can do things however you want to.

I'm not sure I fully understood, but I got the jist ;p

To generate a random value from a list, access it with .selectOne to get a random item, or .evaluateItem to get a finalised string value. And store that in a variable. So like row_animal = animals.evaluateItem. Then use that in the prompt you send to the image generator function. If you want that to change between rows, after a row ends just run that code again to grab a new random item.

[–] wthit56 1 points 4 days ago (2 children)
 

I'm not an AI-chatter myself, but I am still seeing many reports of weirdness.

[–] wthit56 2 points 4 days ago (3 children)

I don't see the code blending_value = [blending_values.selectAll[counter]] in there at all.

next_matrix_image() is very hard to read... you can use if and else statements so it's easier to understand (and code, I'd say).

...None of which really matters to your question. I'm just finding it very difficult to even understand what your code is doing or trying to do. 🫠

Is the problem that it changes animal? Looks to me like it's not changing animal. It always renders horses for me. Is that what you wanted, or didn't want? What do you actually want to happen? I'm so confused... 😅

[–] wthit56 1 points 5 days ago

If you added it to a gallery, then likely the title has the style listed in it on the gallery.

[–] wthit56 1 points 5 days ago (2 children)
 

I guess the fix didn't work, mate ;/

[–] wthit56 1 points 1 week ago

I don't know much about the glitch service or how it works with perchance generators. But what are you trying to do with it? Are you using instructions someone has written or something?

 

Helper functions to add and remove children from a Perchance list.

1
submitted 3 weeks ago* (last edited 3 weeks ago) by wthit56 to c/perchance
 

My newer generators are not having their screenshots generated. https://perchance.org/perchance-object-reference

Though this one works somehow: https://perchance.org/list-management-plugin

They're using the same formatting and scripts for the page as all my others.

1
submitted 3 weeks ago* (last edited 3 weeks ago) by wthit56 to c/perchance
 

Currently it's quite fiddly, making sure all the keys/names arrays are up to date so it still functions as expected.

If it used a set and delete handler it could handle all that internally. Or if there was some special methods we could use like .addValue() and it would figure out what kind of value it is--property, node, function--and handle it correctly.

Of course, I'm working on a plugin now to handle this for people. 😜

 

There's a lot of stuff that becomes real fiddly to do because they are not iterable... that would be real easy to do if they were iterable. I believe there's a proxy "trap" for iterating over properties somewhere in there.

 

This plugin overrides the device's color scheme, but uses the existing styles. No changing of styles is needed whatsoever; it just works.

 

Most likely SUPER not a priority. But you know me 😅

https://perchance.org/prompt-style-tester#edit

The "go" button updates the entire page. As the options are generated this means they are re-generated, which means the chosen option resets, and you can only ever test the top option: Painted Anime.

Simple fix though: put a div with an id around the generations, then update that div only. That's all that needs updating anyway.

1
submitted 3 weeks ago by wthit56 to c/perchance
 

As we have ignorePerchanceErrors() and clearPerchanceErrors(), seems fair to have this function too, for public use.

 

Would be useful to be able to see the images just in the page so we don't accidentally delete the wrong one, stuff like that. I know we can click on the link, but this would just be a nice feature to make it easier.

 

Another day, another learn...ing...s.

This covers everything from how to start editing/making a generator, to writing perchance code. (The more web-y stuff are covered in my other tutorial.)

 

Seems to be related to this: ___htmlToElements(). It takes a string which is the text, ignoring the fact that HTML entities are not normal characters and should not be interpreted as normal HTML. For example, &lt; will be interpreted as < which can open a tag.

Example: https://perchance.org/qzi72h52te#edit

So if an element contains any perchance code, and HTML entities, the HTML entities are essentially lost and become real characters. Which isn't what you want if you're trying to present plain-text code to the user.

Definitely does not work as expected at least.

view more: next ›