wthit56 Now • 100%
So to avoid the potential of someone going to the generators page in the 5 second window in which it's public--the first and only time it ever will be--you'd make an entire new email address, and perchance account, and set that up in your browser so you can have both accounts open at once? You do you, but man that seems like a lot of work to avoid that very slim chance 😅
wthit56 Now • 100%
Are you asking about the Lemmy forum specifically? It doesn't just delete things at random or something like that.
You can find all your own comments and posts by clicking on your name (top-right) and clicking on "profile." Then you can filter by comments/posts etc.
wthit56 Now • 100%
You're welcome 🙏
wthit56 Now • 100%
They are generated. The whole image is generated. Hence the term "AI generated image." It's never just copy-pasted from a real photo.
Even when you use the name of a celebrity, that face is generated... to look similar to that celebrity. But it's still generated.
wthit56 Now • 100%
Are you planning on signing out every time you want to work on a version? And making a new version?
What I do while working on a new version is, I work on a private/unlisted copy of the generator. I find that a lot easier. And I can reuse it too. That other copy becomes the backup of the code. And I copy the code across to the public "real" version when I'm ready for the world to see. Just a thought.
wthit56 Now • 100%
A little tip about Lemmy... leave an empty line between things to make sure they're shown on different lines. This post looks nutty XD
wthit56 Now • 100%
I think there was someone else with a similar problem. They thought it was because of that 4-letter code it happened to generate, but it was probably this. 😅
wthit56 Now • 100%
That's just the built-in spell checker for your browser. Not sure why it didn't recognise "noah" and "bradley" but that's all it is. This isn't coming from perchance or the generator you are using.
wthit56 Now • 100%
Oh interesting. Maybe they use a different term, or auto-sticky anything from a particular user, or something. Weird...
wthit56 Now • 100%
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 Now • 100%
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 Now • 100%
Oh I see. I'll keep these things in mind for people that ask.
wthit56 Now • 100%
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 Now • 100%
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 Now • 100%
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.
I'm not an AI-chatter myself, but I am still seeing many reports of weirdness.
wthit56 Now • 100%
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 Now • 100%
If you added it to a gallery, then likely the title has the style listed in it on the gallery.
wthit56 Now • 100%
URGENT @perchance@lemmy.world
I guess the fix didn't work, mate ;/
wthit56 Now • 100%
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.
My newer generators are not having their screenshots generated. [https://perchance.org/perchance-object-reference](https://perchance.org/perchance-object-reference) Though this one works somehow: [https://perchance.org/list-management-plugin](https://perchance.org/list-management-plugin) They're using the same formatting and scripts for the page as all my others.
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](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.
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, `<` will be interpreted as `<` which can open a tag. Example: [https://perchance.org/qzi72h52te#edit](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.
For example, I'm linking to [the Learn tab](https://perchance.org/hub#Learn) but that doesn't actually open the Learn tab.
No error message makes it to the display. In the console there is: ``` Critical error in __createPerchanceTree: TypeError: Cannot read properties of undefined (reading 'startsWith') ``` And in the error messages there's just this: ``` Your generator's script seems to have errors in it. If you haven't recieved any other errors above this one which could indicate what went wrong, then this could be a bug in the Perchance engine. *etc...* ``` ("recieved" should be "received" by the way 😜)
As seen here: [https://perchance.org/p5bdhjbfv6#edit](https://perchance.org/p5bdhjbfv6#edit) So it still runs somehow? And accesses the grandparent somehow? Likely a bug with how escapes are stripped out--and perhaps recursively processed or something...
[https://perchance.org/2p16eseroi#edit](https://perchance.org/2p16eseroi#edit) Got a tricky situation here. If I do a `.replace()` on the html of an element (just some formatting stuff for code blocks), the `update()` is still referencing old text nodes. So it just doesn't care about the new ones that are there from the replace and they stay there. And it adds new ones that are actually updated. Not sure what to do about that, honestly. Ideally I'd be able to do this replace *before* the initial update of code blocks is run. Is there some way of doing that? The issue seems to only happen for code blocks? Maybe?
Based on the [newly added explanation of the public API calls themselves](https://perchance.org/advanced-tutorial#public_apis), I've made a little plugin for using those APIs a little easier, along with the usual demos and explanations.
If I have padding on the body, it doesn't do much. Because there's `height:100%` on the body by default, which is actually incorrect and causes this issue for reasons. As seen here: [https://perchance.org/o0demyuvpj#edit](https://perchance.org/o0demyuvpj#edit) Whereas without *any* default styles the padding would work as expected. It should be `max-height:100%` instead, which would not have the problem. Could I request that be changed?
A while back I put together everything I could find about perchance. One such document included all properties on objects on perchance pages (that aren't the built-ins from JS). On discord someone said how they wish there was such a reference. So... now there is!
> perchance.org/api/getGeneratorList?max=123 - limit to a maximum of 123 generators Are they latest-first? It doesn't seem like this "max" has to do with how many generators are returned. But the number returned does scale with it. So... last-updated age, perhaps? Not sure what unit of time it would be though. Quite confused. Could be that it's the max, *before* it removes private generators? Which would kind of make it not be the "maximum" anything really. Not a very useful parameter as it would be if it would *actually* give X number of generators--for paging, etc. (Speaking of which is there a way of specifying "start from X generator number and later" for paging to work well?) I don't know what the default "max" or whatever is for this api. Seems to fluctuate how many are returned, and it's not always a round number.