Page 1 of 1

HTML/JS HELP NEEDED: Isotropic non-totalistic rulestring generator

Posted: April 23rd, 2021, 5:14 am
by muzik
Since I've decided it's probably time to start giving back to the community rather than constantly demanding from it, here's a disgustingly rudimentary rulestring generator for the common INT rulespace:

https://muzikbike.github.io/projects/ca ... moore.html

This was mainly done as a proof of concept and a super basic learning experience for javascript, as the output is clearly nowhere near usable without far too much manipulation (removing newlines, etc.) and doesn't support the common - negation. Not to mention that the javascript used is a complete mess - you programmers are probably all laughing your asses off at my painfully recursive generation method. I plan to eventually have it output the resulting string into a text box, and also have that text box be an input box which changes the checkboxes accordingly, but I have absolutely no idea as to where to start on that, so any pointing in the right direction would be appreciated.

My main priorities/questions are as follows:

- Are there any optimisations that can be made to the current javascript?
- How would I implement the - negation? How can I detect when there are too many transitions, and then only use the ones that specifically aren't selected?
- How exactly would I go about reading info from the checkboxes, and then how would I go about having the output be placed into a text box? This would probably require the press of a button rather than having the text box be dynamically updated.
- Then how would making that text box work as an input work? How would I, after validating it, read the rulestring and set each box to checked or unchecked accordingly?
- Is there any way I can include a LifeViewer embed (always of the latest version) at the bottom, which would use the generated rule?

Anyway, I consider this thing to at least be a start.

Re: HTML/JS HELP NEEDED: Isotropic non-totalistic rulestring generator

Posted: April 23rd, 2021, 8:41 am
by muzik
I've updated this to v0.0.3 and rulestrings are now added to a text box rather than displayed directly on the page horribly. The code to do it is still a mess, though, and I welcome advice from anyone who actually knows what they're doing.

Re: HTML/JS HELP NEEDED: Isotropic non-totalistic rulestring generator

Posted: April 23rd, 2021, 9:27 am
by yujh
Probably a place to input rulestring (or directly put a lifeviwer out there?)

Re: HTML/JS HELP NEEDED: Isotropic non-totalistic rulestring generator

Posted: April 23rd, 2021, 1:20 pm
by muzik
v0.0.11 is now live:
- rulestring generation should now always produce the canonical form
- a link to Catagolue is also generated alongside the rulestring
- detection of the presence of transitions is now more efficient

Again, don't think I've implemented any of this optimally. Keep in mind that this project is entirely open source, so if you know how to make my laughably bad code better, go ahead.

Reading and decoding input rulestrings is up next.

Re: HTML/JS HELP NEEDED: Isotropic non-totalistic rulestring generator

Posted: April 23rd, 2021, 2:01 pm
by bprentice
Square Cell uses the following dialog to display and modify the Non Totalistic rule family parameters:

D.png
D.png (198.56 KiB) Viewed 1683 times

Brian Prentice