▲ 747 ▼ Trick XOR Treat (lemmy.dbzer0.com) submitted 1 year ago by wizardbeard@lemmy.dbzer0.com to c/programmer_humor@programming.dev 39 comments fedilink hide all child comments Definitely a repost, but it fits the season
[–] filthy_lint_ball@lemmy.world 1 point 1 year ago (8 children) "(!Trick) && Treat" is probably the binding they meant permalink fedilink source parent hideshow 8 child comments replies: [–] captain_aggravated@sh.itjust.works 1 point 1 year ago (7 children) Or to simplify, Treat NOT Trick? permalink fedilink source parent hideshow 7 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (6 children) Yes, but I saw changing the order of them as non-compliant with the meme. I could have added a parenthesis but that also felt too technical. permalink fedilink source parent hideshow 6 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (5 children) Is there a standard order of operations for boolean logic, such as PEMDAS is for arithmetic? permalink fedilink source parent hideshow 5 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (3 children) That's an interesting question, and I'm gonna go learn the answer. duckduckgo powers activate! So yes, they do. It generally goes NOT, AND, OR. And if you're doing algebra in binary and you've got boolean operators in there (you can AND two numbers the same way you can ADD two numbers in binary) PEMDAS becomes PEMDASNAO. permalink fedilink source parent hideshow 3 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (2 children) Nice, so my gut feeling about not needing the parenthesis above was right. permalink fedilink source parent hideshow 2 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent [–] Natanael@infosec.pub 1 point 1 year ago That's language specific. In math it's mostly just a parenthesis permalink fedilink source parent
[–] captain_aggravated@sh.itjust.works 1 point 1 year ago (7 children) Or to simplify, Treat NOT Trick? permalink fedilink source parent hideshow 7 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (6 children) Yes, but I saw changing the order of them as non-compliant with the meme. I could have added a parenthesis but that also felt too technical. permalink fedilink source parent hideshow 6 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (5 children) Is there a standard order of operations for boolean logic, such as PEMDAS is for arithmetic? permalink fedilink source parent hideshow 5 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (3 children) That's an interesting question, and I'm gonna go learn the answer. duckduckgo powers activate! So yes, they do. It generally goes NOT, AND, OR. And if you're doing algebra in binary and you've got boolean operators in there (you can AND two numbers the same way you can ADD two numbers in binary) PEMDAS becomes PEMDASNAO. permalink fedilink source parent hideshow 3 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (2 children) Nice, so my gut feeling about not needing the parenthesis above was right. permalink fedilink source parent hideshow 2 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent [–] Natanael@infosec.pub 1 point 1 year ago That's language specific. In math it's mostly just a parenthesis permalink fedilink source parent
[–] Lifter@discuss.tchncs.de 1 point 1 year ago (6 children) Yes, but I saw changing the order of them as non-compliant with the meme. I could have added a parenthesis but that also felt too technical. permalink fedilink source parent hideshow 6 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (5 children) Is there a standard order of operations for boolean logic, such as PEMDAS is for arithmetic? permalink fedilink source parent hideshow 5 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (3 children) That's an interesting question, and I'm gonna go learn the answer. duckduckgo powers activate! So yes, they do. It generally goes NOT, AND, OR. And if you're doing algebra in binary and you've got boolean operators in there (you can AND two numbers the same way you can ADD two numbers in binary) PEMDAS becomes PEMDASNAO. permalink fedilink source parent hideshow 3 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (2 children) Nice, so my gut feeling about not needing the parenthesis above was right. permalink fedilink source parent hideshow 2 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent [–] Natanael@infosec.pub 1 point 1 year ago That's language specific. In math it's mostly just a parenthesis permalink fedilink source parent
[–] Lifter@discuss.tchncs.de 1 point 1 year ago (5 children) Is there a standard order of operations for boolean logic, such as PEMDAS is for arithmetic? permalink fedilink source parent hideshow 5 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (3 children) That's an interesting question, and I'm gonna go learn the answer. duckduckgo powers activate! So yes, they do. It generally goes NOT, AND, OR. And if you're doing algebra in binary and you've got boolean operators in there (you can AND two numbers the same way you can ADD two numbers in binary) PEMDAS becomes PEMDASNAO. permalink fedilink source parent hideshow 3 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (2 children) Nice, so my gut feeling about not needing the parenthesis above was right. permalink fedilink source parent hideshow 2 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent [–] Natanael@infosec.pub 1 point 1 year ago That's language specific. In math it's mostly just a parenthesis permalink fedilink source parent
[–] captain_aggravated@sh.itjust.works 2 points 1 year ago (3 children) That's an interesting question, and I'm gonna go learn the answer. duckduckgo powers activate! So yes, they do. It generally goes NOT, AND, OR. And if you're doing algebra in binary and you've got boolean operators in there (you can AND two numbers the same way you can ADD two numbers in binary) PEMDAS becomes PEMDASNAO. permalink fedilink source parent hideshow 3 child comments replies: [–] Lifter@discuss.tchncs.de 1 point 1 year ago (2 children) Nice, so my gut feeling about not needing the parenthesis above was right. permalink fedilink source parent hideshow 2 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent
[–] Lifter@discuss.tchncs.de 1 point 1 year ago (2 children) Nice, so my gut feeling about not needing the parenthesis above was right. permalink fedilink source parent hideshow 2 child comments replies: [–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent
[–] captain_aggravated@sh.itjust.works 2 points 1 year ago (1 child) I store-brand googled it, so I feel I'm not an authority to say one way or another! permalink fedilink source parent hideshow 1 child comment replies: [–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent
[–] silasmariner@programming.dev 1 point 1 year ago It's a reasonable convention that matches the common DNF (disjunctive normal form) of propositional logic, can confirm it's the right read. I'd still probably use parentheses for the ∧ (and/conjunction), though I'd never bother with it for ¬ (negation) permalink fedilink source parent
[–] Natanael@infosec.pub 1 point 1 year ago That's language specific. In math it's mostly just a parenthesis permalink fedilink source parent