Infixes of Scene.my Functions Saved
4 posts • Page 1 of 1
Infixes of Scene.my Functions Saved
In some (albeit rare) cases, I find it handy to use custom infix functions.
For example:
In this case, I think that these infix functions should be serialized (i.e. saved with the scene, like the scene.my functions they represent)
Also, I suggest that saving infixes of functions that are not located in the scene.my. directory (math.nor, for example) onto the computer and saved not in scene.phn but in config.cfg.
If neither of these are possible, or even if they are, I suggest the ability to infix functions via onCollide. This way, I could instantaneously undo the sim start, declare the variables, declare the infixes, delete the object, and still have it be phunlet-safe.
Also, I would finally suggest the ability to overload infixes based on the type of variables the function takes.
For example, I originally planned to infix scene.my.xnor as _ == _ and scene.my.xor as _ != _.
These new functions will only accept booleans, a type of variable that neither of the existing infixes for that syntax will accept.
For example:
- Code: Select all
scene.my.nor = (a, b)=>{!(a || b)};
scene.my.nand = (a, b)=>{!(a && b)};
infix 2 left: _ !| _ => scene.my.nor;
infix 2 left: _ !& _ => scene.my.nand;
scene.my.xor = (a, b)=>{(a !& b) && (a || b)};
scene.my.xnor = (a, b)=>{(a !| b) || (a && b)};
infix 2 left: _ %% _ => scene.my.xor;
infix 2 left: _ !% _ => scene.my.xnor
In this case, I think that these infix functions should be serialized (i.e. saved with the scene, like the scene.my functions they represent)
Also, I suggest that saving infixes of functions that are not located in the scene.my. directory (math.nor, for example) onto the computer and saved not in scene.phn but in config.cfg.
If neither of these are possible, or even if they are, I suggest the ability to infix functions via onCollide. This way, I could instantaneously undo the sim start, declare the variables, declare the infixes, delete the object, and still have it be phunlet-safe.
Also, I would finally suggest the ability to overload infixes based on the type of variables the function takes.
For example, I originally planned to infix scene.my.xnor as _ == _ and scene.my.xor as _ != _.
These new functions will only accept booleans, a type of variable that neither of the existing infixes for that syntax will accept.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Infixes of Scene.my Functions Saved
already suggested and completely support! 
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Infixes of Scene.my Functions Saved
Support 

I don't suffer from insanity. I enjoy every minute of it.
-

Rrobba - [Best Sig 2010]
- Posts: 1480
- Joined: Mon Aug 31, 2009 6:01 pm
- Location: Gibraltar
Re: Infixes of Scene.my Functions Saved
Wow... I didn't know this had been suggested already.
I might also suggest adding the Boolean logic operators and the respective ideal infixes (i.e. !|, !&, !=, and ==) into the default math directory.
I might also suggest adding the Boolean logic operators and the respective ideal infixes (i.e. !|, !&, !=, and ==) into the default math directory.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.
ARE YA HAPPY NOW?????
Thymechanic/Phundamentalist
Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest



