Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Arithmetics Operator Priority

Name: Anonymous 2013-07-17 2:06

Is it really worth it?

Because common operations like (A+B)/2 are more readable without operator priority A+B/2. I know priority exists because of linear algebra liek A*X+B*Y+C, which otherwise require A*X+(B*X)+C, but in real life no one uses linear algebra beyond simple A*X+C.

So I propose prioritary equality for all operators.

Name: Anonymous 2013-07-17 2:29

What exactly is Jewish mathematics?

Name: Anonymous 2013-07-17 2:32

Same for AND and OR operators. There are no preconditions to give them different precedence, beside their order of appearance.

Name: Anonymous 2013-07-17 2:32

>>2
One that makes your head spin.

Name: Anonymous 2013-07-17 2:40

Linear Algebra enforces no orders of operations.  For a given field (or whatever structure you like best) with operators R and S, all that is required is certain degrees of Transitivity, Commutatitivity, Identity, etc. on the parts of R and S.  It is simply arithmetic convention that places ab+c as equivalent to (ab)+c.

But what you say is valuable - I use parentheses in all my mathematical operations while coding, if for no other reason that to enforce to those that came after me that I did not misunderstand order of operations and write 2*x+1 when I meant 2*(x+1).  However, simply saying `equality' is a bit vague, and causes us to fall back on left-right or right-left convention, which in the current situation is pleasantly ambiguous, because nobody gives a shit in which order the compiler evaluates x*y+z*a+b*x*c+z*(a+b+x*z) as long as it follows the order of operations.

I think the correct solution is to follow Lisp's model and use RPN notation, or to use stack push/pop notation, or simply to say that when multiple arithmetic operations appear and their order is not expressely given by parentheses, the result is undefined.  The latter would probably be the best choice if you wanted to write patches for all compilers/interpreters for all major languages to try and enforce your vision on the programming world, as it would be very easy to convert old code forward.

Name: Anonymous 2013-07-17 2:55

Other way to group operations is by using white space; say X+X * Y+Y parses as (X+X)*(Y+Y), while X*X + Y*Y gives (X*X) + (Y*Y).

If you love Python, you will love whitespace grouping!

Name: Anonymous 2013-07-17 2:59

>>6
You are a magnificent bastard.  I wish you were next to me in real life so I could shake your hand, then slam your face into the curb repeatedly.

Name: Anonymous 2013-07-17 3:01

>>7
I will slit your throat and not even feel a thing.

Name: Anonymous 2013-07-17 3:06

>>8
I bet you would.  And then you'd tuck your slightly bloodied tie inside your jacket, adjust your glasses and walk right into a meeting with the CIO to explain why Confluence will improve developer efficiency by at least 15% in the next quarter and 35% projected over the next year.

Name: Anonymous 2013-07-17 3:12

stallman.org/rms-lifestyle.html

As a matter of principle, I refuse to own a tie.

I find ties uncomfortable, so I don't wear them. If ties were simply a clothing option, I would decline to use them but there would be no reason to make a fuss about it. However, there is an absurd social pressure on men to wear ties. They do this as a form of sucking up to the boss.

When I worked at MIT, I was shocked that MIT graduates, people who could have almost dictated employment terms, felt compelled to wear ties to job interviews, even with companies that (they knew) had the sense not to ask them to wear ties on the job.

I think the tie means, "I will be so subservient as an employee that I will do even totally senseless things just because you tell me to." Going to a job interview without a tie is a way of saying you don't want to work for someone who wants that.

The people who wear ties under these circumstances are victim-coperpetrators: each one who cedes to this pressure and wears a tie increases the pressure on others. This is a central concept for understanding other forms of propagating nastiness, including nonfree software and Facebook. In fact, it was in regard to ties that I first recognized this phenomenon.

I don't condemn victim-coperpetrators, since they are primarily victims and only secondarily perpetrators. But I believe I should not be one of them. I hope my refusal to wear a tie will make it easier for you to refuse as well.

The first time I visited Croatia, that country had a major PR campaign based on being the origin of the tie. ("Cravate" and "Croat" are related words.) You can imagine my distaste for this — therefore, I referred to that country as "Tieland" for a while.

The Free Software Foundation's dress code says that a propeller beanie is required, but other clothing is optional. However, we don't enforce it.

Name: Anonymous 2013-07-17 3:29

╔═══════
║\
║ \
   \
    \
     \
      \
       Check 'em

Name: Anonymous 2013-07-17 3:48

>>10
RMS is right about the ties being a "formal bullshit", but
>The Free Software Foundation's dress code says that a propeller beanie is required
WTF

Name: Anonymous 2013-07-17 4:12

>>11
I'm not sure what I'm supposed to be checking?

Name: Anonymous 2013-07-17 5:06

I think the tie means, "I will be so subservient as an employee that I will do even totally senseless things just because you tell me to."
He's completely right, but for some reason he says that as if it were a bad thing. The point of a hierarchical command structure is that everyone does what they are told and the entire organization operates as a whole.

That doesn't mean "sucking up to the boss", that means doing what you're paid for, even if you, possibly in your ignorance, don't see the sense in it.

That doesn't mean that there should be no upward flow of information and suggestions, quite the opposite, but when a boss says "all right, most of you seem to prefer this course of action, let us do it", everyone does it. Even if it happens to be not optimal, it is better when everyone together orderly and efficiently implement a suboptimal solution than when everyone tries to implement their own incompatible slightly better solution (and in 90% of the instances it only looks better, in their limited understanding of the whole system). Explains everything about GNU software, doesn't it, though?

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-17 6:26

>>6
7/10

It would totally not surprise me if Python behaved like that. Yuck.

Name: Anonymous 2013-07-17 6:48

>>13
Do you want us to tell you if you're not sure about something?

Name: Anonymous 2013-07-17 7:45


FUCK YOU.
JUST DO EVERYTHING IN FUCKING RPN.
YOU ASSHOLE.

Name: Anonymous 2013-07-17 8:20

Why is this mush more easier to read than other notations:
§1 (/ (+ A B) 2)
§2 (+ (* A X) (* B Y) C)

Everything was already described here:
https://en.wikipedia.org/wiki/Mathematical_operation
https://en.wikipedia.org/wiki/Logic_symbols
https://en.wikipedia.org/wiki/Logical_connective
https://en.wikipedia.org/wiki/Mathematical_Operators
https://en.wikipedia.org/wiki/Operator_%28programming%29

>>11
↖|↰|↸|⇖|↻|⇱|

Name: Anonymous 2013-07-17 13:12

>>14
submissive kike detected

muh tie
muh boss
muh money

Name: Anonymous 2013-07-17 13:17

>>14
And with machiavellian retards like this guy we end up with CHINESE MADE products and very buggy and exploitable software.

get some morals you dumbass or just die unhappy and a loser anyways

Name: Anonymous 2013-07-17 13:31

>>13
his autism

Name: Anonymous 2013-07-17 14:27

↖ check em

Name: Anonymous 2013-07-17 14:59

>>13
The dubs you cretin.

Name: Anonymous 2013-07-17 15:18

>>23
Which dubs?

Name: Anonymous 2013-07-17 15:20

↖(^_^↖)  (↗^_^)↗

Name: Anonymous 2013-07-17 22:59

>>18
Whoa, thanks. My next doubles are going to be so checked it's not even funny.

Name: Anonymous 2013-07-18 1:40

>>25
cute!

Name: Anonymous 2013-07-18 5:11

>>15
Actually, Lisp/Scheme does exactly that. "-123" is a negative number, while "- 123" is a symbol "-" and a number "123"

Same for Symta, because the "," delimiter makes lists unreadable and ugly {1,2,3,4} instead of neat (1 2 3 4), so I use spaces to disambiguate between unary and binary "-". Other alternative is to use "~", but it would confuse newbies if I ever release Symta.

Name: Anonymous 2013-07-18 7:56

>>28
No lisp does not do exactly that. You stupid fucking nigger, both -123 and - 123 are sets of symbols.

Name: Anonymous 2013-07-18 11:28

>>29
123 is not a symbol you stupid nigger, it's an atom of type integer.

Name: Anonymous 2013-07-18 12:28

>>30
learn to lexer you stupid fucking nigger

Don't change these.
Name: Email:
Entire Thread Thread List