Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2019-05-29 01:31:50

pncordik
Member
From: I'm a beggar so I don't live
Joined: 2018-06-23
Posts: 183

arithmetic in signs

the purpose of the idea is to do arithmetic in EE, as shown in the title of the topic
the idea is simple, you just do things like %10 - %deaths%% to show how many deaths is remaining to block passage, for example, or %%bcoins%+%coins%%
symbol meanings: + for addiction, - for subtraction, * for multiplication, ** for square, cube, potency, / for division (note, for radiciation you just do %root ** 1 / index%)
with these symbols, you can do the simple calculations as sufficient to EE


knAxnIR.jpg

Offline

Wooted by: (4)

#2 2019-05-29 05:42:03

AllenCaspe9510
Member
From: Heart Locket
Joined: 2018-03-24
Posts: 901
Website

Re: arithmetic in signs

The Sign has turned into a calculator, but how do we change the number if we already placed it?


I Animate Stuff

ezgif.com-gif-maker.gif

Offline

Wooted by:

#3 2019-05-29 07:17:48

peace
Member
From: admin land
Joined: 2015-08-10
Posts: 9,226

Re: arithmetic in signs

just rewirte the sign

i dont see why you need this you can ju-.. oh wait thats actualy ncie 10- deaths


peace.png

thanks hg for making this much better and ty for my avatar aswell

Offline

Wooted by:

#4 2019-05-29 14:41:45

TaskManager
Formerly maxi123
From: i really should update this
Joined: 2015-03-01
Posts: 9,465

Re: arithmetic in signs

Including only basic operators such as addition and subtraction would be a neat thing to have
multiplication maybe
i dont know about division though, theres a question whether division should always return rounded whole numbers or floating point numbers, and if its the latter then how many decimals should it have after floating point?
i think modulo would be a good feature as well (remainder of a division)


i8SwC8p.png
signature by HG, profile picture by bluecloud, thank!!
previous signature by drstereos

Offline

Wooted by:

rat

#5 2019-05-29 15:14:49

peace
Member
From: admin land
Joined: 2015-08-10
Posts: 9,226

Re: arithmetic in signs

division cuould have decimals up to 10 (you choose)


peace.png

thanks hg for making this much better and ty for my avatar aswell

Offline

#6 2019-05-30 00:15:14

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: arithmetic in signs

Would be neat

%{10-%coins%}% -- coins:4 --> 6

%{%coins%/3, 2}% -- coins:4 --> 1.33
I see no reason why just adding ", 2" to the end wouldn't denote a maximum decimal length
%{%coins%, -1}% -- coins:123 --> 120    | %{%coins% - (%coins%, -1)}% -- coins:123 --> 3


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Wooted by:

#7 2019-05-30 09:50:03

peace
Member
From: admin land
Joined: 2015-08-10
Posts: 9,226

Re: arithmetic in signs

Koya wrote:

Would be neat

%{10-%coins%}% -- coins:4 --> 6

%{%coins%/3, 2}% -- coins:4 --> 1.33
I see no reason why just adding ", 2" to the end wouldn't denote a maximum decimal length
%{%coins%, -1}% -- coins:123 --> 120    | %{%coins% - (%coins%, -1)}% -- coins:123 --> 3

yeah but maby add a limit in the amoutn of decimals showing i mean what if you put there an big number because 4/3 has infinity decimals
also maby %pi2% > 3.14


peace.png

thanks hg for making this much better and ty for my avatar aswell

Offline

#8 2019-05-30 10:35:28

Veelmoth
Member
Joined: 2018-05-03
Posts: 60

Re: arithmetic in signs

Yeah, it's a good and useful idea, because our games could be more and more interesting and colorful with this little "calculator"... because of this i agree with this...
However the lenght of the characters (letters) what we could use in the sign is limited, and it could be a big problem when we would like to write a complex and long formula.

Koya wrote:

%{10-%coins%}% -- coins:4 --> 6

%{%coins%/3, 2}% -- coins:4 --> 1.33

Such as If Koya's formula twice or 3 times longer, then we mostly wasted too much "free characters " what we could use in the signs.
Honestly, If the people would like this little "calculator", then let's add more "free characters " to the signs.

So if we can use now 140 characters, then that could be more better if in the future we could use more then 200 characters OR use 140 caracters just like now WHILE the "calculator" doesn't count the characters between two "%%".

This is all what i would like to say. You can ignore it, if you want, because it's only my opinion. //forums.everybodyedits.com/img/smilies/wink

Offline

Wooted by:

#9 2019-05-30 10:51:07, last edited by Minimania (2019-05-30 10:51:32)

Minimania
Moderation Team
From: PbzvatFbba 13
Joined: 2015-02-22
Posts: 6,395

Re: arithmetic in signs

Veelmoth wrote:

Yeah, it's a good and useful idea, because our games could be more and more interesting and colorful with this little "calculator"... because of this i agree with this...
However the lenght of the characters (letters) what we could use in the sign is limited, and it could be a big problem when we would like to write a complex and long formula.

Koya wrote:

%{10-%coins%}% -- coins:4 --> 6

%{%coins%/3, 2}% -- coins:4 --> 1.33

Such as If Koya's formula twice or 3 times longer, then we mostly wasted too much "free characters " what we could use in the signs.
Honestly, If the people would like this little "calculator", then let's add more "free characters " to the signs.

So if we can use now 140 characters, then that could be more better if in the future we could use more then 200 characters OR use 140 caracters just like now WHILE the "calculator" doesn't count the characters between two "%%".

This is all what i would like to say. You can ignore it, if you want, because it's only my opinion. //forums.everybodyedits.com/img/smilies/wink

So, what you're saying is it's like % is how you parse code into your signs, and that code (the code itself, not its results) doesn't count towards the sign's maximum character count because that code doesn't actually appear on the sign itself?

Hopefully I'm getting that right


21cZxBv.png
Click the image to see my graphics suggestions, or here to play EE: Project M!

Offline

#10 2019-05-30 11:23:59

peace
Member
From: admin land
Joined: 2015-08-10
Posts: 9,226

Re: arithmetic in signs

Crybaby wrote:
Veelmoth wrote:

Yeah, it's a good and useful idea, because our games could be more and more interesting and colorful with this little "calculator"... because of this i agree with this...
However the lenght of the characters (letters) what we could use in the sign is limited, and it could be a big problem when we would like to write a complex and long formula.

Koya wrote:

%{10-%coins%}% -- coins:4 --> 6

%{%coins%/3, 2}% -- coins:4 --> 1.33

Such as If Koya's formula twice or 3 times longer, then we mostly wasted too much "free characters " what we could use in the signs.
Honestly, If the people would like this little "calculator", then let's add more "free characters " to the signs.

So if we can use now 140 characters, then that could be more better if in the future we could use more then 200 characters OR use 140 caracters just like now WHILE the "calculator" doesn't count the characters between two "%%".

This is all what i would like to say. You can ignore it, if you want, because it's only my opinion. //forums.everybodyedits.com/img/smilies/wink

So, what you're saying is it's like % is how you parse code into your signs, and that code (the code itself, not its results) doesn't count towards the sign's maximum character count because that code doesn't actually appear on the sign itself?

Hopefully I'm getting that right

yeha btu what if the resutl itself is longer?


peace.png

thanks hg for making this much better and ty for my avatar aswell

Offline

#11 2019-05-30 12:39:14, last edited by Veelmoth (2019-05-30 12:42:12)

Veelmoth
Member
Joined: 2018-05-03
Posts: 60

Re: arithmetic in signs

Crybaby wrote:

So what you're saying is it's like % is how you parse code into your signs and
that code (the code itself, not its results) doesn't count towards the sign's
maximum character count because that code doesn't
actually appear on the sign itself?

Hopefully I'm getting that right


Yes. The caracters between the "%%" won't appear on the sign itself, and because of this that could be such a waste if the signs count them, when we write something.

Peace wrote:

yeha btu what if the resutl itself is longer?


Idk. What I suggested was just only an idea, and honestly idk, if it's possible to make it or no.
And If it's too hard to do it (if it's too complicate), then you can ignore my idea. //forums.everybodyedits.com/img/smilies/smile

Offline

#12 2019-05-30 13:26:30

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,211

Re: arithmetic in signs

just saying, that would be very hard to implement
you would have to built a string interpreter that analyzes different tokens and stuff
i am not saying that it is impossible, but it's sure hard

Offline

#13 2019-05-30 15:44:08, last edited by LukeM (2019-05-30 15:44:24)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: arithmetic in signs

Gosha wrote:

just saying, that would be very hard to implement
you would have to built a string interpreter that analyzes different tokens and stuff
i am not saying that it is impossible, but it's sure hard

The parsing wouldn't be particularly hard, things like this are pretty standard and there are plenty of well documented algorithms for doing this, its mostly just a question of whether it would be useful enough for it to be worth it, as currently the numer of useful calculations you could do based on coins and deaths are pretty limited.

I guess maybe if EEU adds more things that could use this then it could be useful, but I'm not really sure whats planned for later development.

Offline

#14 2019-05-30 15:48:36

TaskManager
Formerly maxi123
From: i really should update this
Joined: 2015-03-01
Posts: 9,465

Re: arithmetic in signs

Koya wrote:

Would be neat

%{10-%coins%}% -- coins:4 --> 6

%{%coins%/3, 2}% -- coins:4 --> 1.33
I see no reason why just adding ", 2" to the end wouldn't denote a maximum decimal length
%{%coins%, -1}% -- coins:123 --> 120    | %{%coins% - (%coins%, -1)}% -- coins:123 --> 3

this is what i was afraid of
add enough operators (particularly division with floating point) and you get a syntax that quickly becomes confusing
if i were a casual player unfamiliar with the context of this thread, i wouldnt be able to tell that {X, Y} is rounding X to Y digits after comma


i8SwC8p.png
signature by HG, profile picture by bluecloud, thank!!
previous signature by drstereos

Offline

#15 2019-05-30 17:46:29, last edited by Koya (2019-05-30 18:04:58)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: arithmetic in signs

Gosha wrote:

just saying, that would be very hard to implement
you would have to built a string interpreter that analyzes different tokens and stuff
i am not saying that it is impossible, but it's sure hard

Not really, made an example, the logic for the sign can be put on one line https://codepen.io/z-/pen/qGJzNE?editors=0010

(LukeM told me that eval is bad, so that needs changing but the principle is the same)


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#16 2019-05-30 18:11:37

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,211

Re: arithmetic in signs

Koya wrote:

eval is bad

Yes, eval is terrible for production. It might lead to some very nasty security holes

Offline

Wooted by:

#17 2019-05-30 21:30:52, last edited by Koya (2019-05-31 21:51:59)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: arithmetic in signs

Gosha wrote:
Koya wrote:

eval is bad

Yes, eval is terrible for production. It might lead to some very nasty security holes

I just rewrote the arithmetic part of eval leaving no security threats https://codepen.io/z-/pen/650c211bb9302 … itors=0012
(never used eval before and was naive)

So now my example doesn't use it https://codepen.io/z-/pen/qGJzNE?editors=0010

Supports +,-,* (or `x`), /, and ^ (pow, not xor)


Have a go

You have died %deaths% time%pdeaths% with %coins% coin%pcoins%, you have %{10-%deaths%}% attempts left\nCoin ratio (2dp): %{%coins%/%bcoins%,2}%\nGood luck!

l0hVp65.png

Would be cool, you can represent complicated things such as you start with 10 lives, each coin you collect you gain 2 lives `You have %{10+(%coins%*2)-%deaths%}% attempts remaining` (coins:7, deaths: 11 => "You have 13 attempts remaining")

Supported code
%coins% - number of gold coins
%pcoins% - returns an "s" if the number of coins is not 1
%bcoins% - number of blue coins
%pbcoins% - returns an "s" if the number of blue coins is not 1
%deaths% - number of deaths
%pdeaths% - returns an "s" if the number of deaths is not 1
%username% - returns lowecase username
%Username% - returns username with first letter capitalised
%USERNAME% - returns uppercase username
%levelname% - returns level name
%{x}% - maths at x is evaluated and returns a number, %coins%, %bcoins%, %deaths% and any numbers can be used with the following operations +,-,* (or x), /, ^ (default to 2 decimal places)
%{x,y}% - maths at x with maximum of y decimal places
/n - new line

Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Wooted by: (3)

#18 2019-05-31 12:29:24

AllenCaspe9510
Member
From: Heart Locket
Joined: 2018-03-24
Posts: 901
Website

Re: arithmetic in signs

This is uhh... Pretty Complicated to use, but I guess its worth it, (There's going to be coding involved in EEU)


I Animate Stuff

ezgif.com-gif-maker.gif

Offline

Wooted by:

#19 2019-05-31 16:12:33, last edited by Koya (2019-05-31 16:14:19)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: arithmetic in signs

AllenCaspe9510 wrote:

This is uhh... Pretty Complicated to use, but I guess its worth it, (There's going to be coding involved in EEU)

I was thinking about adding ternary operator which can compare arithmetic and things like winning, crown, specific switches, everything so text can completely change rather than just numbers something like

%if %coins% = %{%deaths% + 2}% then “Lorem ipsum” else “Loren pisum” endif%
%if %switch:1% then “Lorem ipsum” endif%
%if not %switch:2% then “Lorem ipsum” endif%
%if %bcoins% >= 2 then “You have %{%bcoins% - 2}% more coins than you need” endif%

But that might just be over complicating things too much


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Wooted by:

#20 2019-05-31 19:18:39

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,211

Re: arithmetic in signs

at this point we can creature our own languagEE lol

Offline

Wooted by: (3)

#21 2019-05-31 21:48:01

Slabdrill
Formerly 12345678908642
From: canada
Joined: 2015-08-15
Posts: 3,402
Website

Re: arithmetic in signs

honestly, having a custom string text thing like that would be neat. just have the basic evaluation stuff (and/or/not/add/sub/mul/div/ternary) and then make a bunch of inputs for everything there is (switch enabled, current smiley ID, amount of time left for key to expire, amount of jumps left from multijump effect, etc)


suddenly random sig change

Offline

#22 2019-05-31 21:58:38

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: arithmetic in signs

Gosha wrote:

at this point we can creature our own languagEE lol

It would be cool to actually have a built-in programming language which runs all times the world is open, as long as it isn't lua


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Wooted by:

#23 2019-05-31 22:12:10

St1ckS4m(EE)
Formerly Sticksam
From: Not there nor there, but there
Joined: 2017-12-28
Posts: 459

Re: arithmetic in signs

What's the point of using signs as calculators if people aren't likely going to do math this way? https://wiki.everybodyedits.com/images/6/60/012_inquisitive
(No offense.)


"𝓗𝓘𝓖𝓗 𝓠𝓤𝓐𝓛𝓘𝓣𝓨" non-animated signature.
MfF1IHH.png
You know this eagle ain't lying when he can smell things miles away from him, all thanks to his super powerful sense of smell. (Idc if this image doesn't fit, lol.)
Idk what my profile icon is supposed to be, lol. Activeness: Infrequent ¯\_(º_o)_/¯
Boring fact: Used to have a 709+ daystreak, but lost it due to my memory error...and then eventually lost my 263+ daystreak, also due to my memory error. (Was I sane at that time...?)
Fun fact: If you happen to see my username or Sticksam on Twitter/x or on other sites, that's actually a different person, NOT me. I never use Twitter/x. I just wanted to clear up the confusion a bit for those who are not aware of this, lol.
I honestly know little to nothing about them when I first saw those names on the internet. XD (Might have to give myself a bit of a different nickname at some point in the future.)

Offline

#24 2019-06-01 02:30:43

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: arithmetic in signs

Sticksam wrote:

What's the point of using signs as calculators if people aren't likely going to do math this way? https://wiki.everybodyedits.com/images/6/60/012_inquisitive
(No offense.)

Because when you do need it - it'll be perfect; also we don't know the usage cases because it hasn't been a feature


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#25 2019-06-01 09:52:05

peace
Member
From: admin land
Joined: 2015-08-10
Posts: 9,226

Re: arithmetic in signs

Koya wrote:
AllenCaspe9510 wrote:

This is uhh... Pretty Complicated to use, but I guess its worth it, (There's going to be coding involved in EEU)

I was thinking about adding ternary operator which can compare arithmetic and things like winning, crown, specific switches, everything so text can completely change rather than just numbers something like

%if %coins% = %{%deaths% + 2}% then “Lorem ipsum” else “Loren pisum” endif%
%if %switch:1% then “Lorem ipsum” endif%
%if not %switch:2% then “Lorem ipsum” endif%
%if %bcoins% >= 2 then “You have %{%bcoins% - 2}% more coins than you need” endif%

But that might just be over complicating things too much

how to code thiis in ee lmao


peace.png

thanks hg for making this much better and ty for my avatar aswell

Offline

AllenCaspe95101559558681751545

Board footer

Powered by FluxBB

[ Started around 1732468856.2187 - Generated in 0.131 seconds, 12 queries executed - Memory usage: 1.88 MiB (Peak: 2.18 MiB) ]