Infixes of Scene.my Functions Saved

Suggest changes and improvements to Algodoo.

Do you support the suggestions listed below?

Infixes of scene.my functions are saved with scene.
5
36%
Infixes of non-scene.my functions are saved on hard disc.
3
21%
Ability to declare infixes via onCollide.
3
21%
Ability to overload infixes.
3
21%
 
Total votes : 14

Infixes of Scene.my Functions Saved

Postby Someone Else » Fri Aug 05, 2011 5:54 am

In some (albeit rare) cases, I find it handy to use custom infix functions.

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...
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.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Infixes of Scene.my Functions Saved

Postby Kilinich » Fri Aug 05, 2011 8:12 am

already suggested and completely support! :thumbup:
Dream of Algodoo as game development engine...
User avatar
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

Postby Rrobba » Fri Aug 05, 2011 2:21 pm

Support :D
Image
I don't suffer from insanity. I enjoy every minute of it.
User avatar
Rrobba
[Best Sig 2010]
 
Posts: 1480
Joined: Mon Aug 31, 2009 6:01 pm
Location: Gibraltar

Re: Infixes of Scene.my Functions Saved

Postby Someone Else » Sat Aug 06, 2011 3:08 am

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.
Matthias Wandel is epic, in my humble opinion.
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.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests