4 ms·
"How do you xor two numbers in Julia?" "a ⊻ b" "... am I supposed to type (or copy paste) that symbol every time I want to xor two numbers? There must be a be
by rfoo 3y ago
"How do you xor two numbers in Julia?"
"a ⊻ b"
"... am I supposed to type (or copy paste) that symbol every time I want to xor two numbers? There must be a better way right?"
"Sorry, no."
I immediately gave up the language after this. Too bad, I really loved it and was looking forward to progress in DL stack in Julia at that time. Too math-y.
- adgjlsfhk1 3y agoYou can always just use `xor(a,b)`. Julia makes sure that there aren't any unicode operators that don't have an ascii equivalent (in Base at least). Also, most editors will allow you to type ⊻ as `\xor` and tab complete to ⊻.
- shele 3y agoLa mayoría de humans ist gewohnt avoir mehr letters que clés de toute façon.
- DNF2 3y agoSo you gave up the language after someone gave you a flat out wrong answer to a single question? That's too bad.
- bobbylarrybobby 3y agoJulia has built in support for special characters like that by typing \charname<tab>. You have to remember the name but it's not all that hard to type.
- xdavidliu 3y ago> "... am I supposed to type (or copy paste) that symbol every time I want to xor two numbers? There must be a better way right?" > "Sorry, no." This just false. From https://stackoverflow.com/a/60173810/2990344 https://stackoverflow.com/a/60173810/2990344 help?> ⊻ "⊻" can be typed by \xor<tab>
- dunefox 3y agoIf this is why you stopped using the language then you can't have spent more than an hour on it. \symbol<tab>