[Question]
  [
I know there have been a lot of challenges about "the two best code-golfers in the world", but this one is a bit more unique, being *Round 1* in a series of (future) challenges involving the two of them.
---
Your task is to write a program or function that returns two different non-whitespace ASCII strings, corresponding to the one who has more reputation at the moment the program is ran, between [Dennis ♦](https://codegolf.stackexchange.com/users/12012/dennis) and [Martin Ender ♦](https://codegolf.stackexchange.com/users/8478/martin-ender). The tricky part is that you must output the exact string ***"tie"*** in case the reputation is identical (not likely), and the two *different non-whitespace ASCII strings* mentioned above should be different than *"tie"* **\***.
No input can be taken, such as usernames or user ids. As usual, URL shorteners are forbidden, and so are the common loopholes.
## Examples:
```
Let the chosen string for Dennis be "D" and the chosen one for Martin Ender be "M" (should be specified)
If Dennis' rep > Martin Ender's rep => D
If it's the other way around => M
If it's a tie => tie 
```
---
> 
> **IMPORTANT!** Voting on posts by Dennis & Martin for the sole purpose of affecting a tie in order to test the solutions below constitutes targeted voting which is forbidden across the Stack Exchange network. If you want to test that a solution properly outputs `tie` then change the IDs in it to those of 2 users you know to be tied. See [this Meta post](https://codegolf.meta.stackexchange.com/q/12334/58974) for more details.
> 
> 
> 
\**I think no one would have used that, anyway*
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/), ~~65~~ 64 bytes
### Code:
```
•в=6{•5ôvy’ƒËŠˆ.Â‚‹º.ŒŒ/†š/ÿ’.w’„Ö="Âˆ"’¡1èт£þ}})ZQā*O<“D M·‡“#è
```
Uses the **05AB1E** encoding.
  
### Explanation:
`•в=6{•` converts the number `в=6{` from base 255 to base 10, resulting in [1201208478](https://tio.run/nexus/05ab1e#@/@oYdGFTbZm1UD6/38A). The first half being the ID of Dennis (12012) and the second half being the ID of Martin (8478). Split into pieces of 5 using `5ô` to get the following array:
```
['12012', '08478']
```
Luckily, we can leave the leading zero from Martin's ID, since [this will still work](https://codegolf.stackexchange.com/users/08478) (check the link before clicking to see the leading zero).
We now loop through this array using `vy` and construct the following string from this 05AB1E code:
```
’ƒËŠˆ.Â‚‹º.ŒŒ/†š/ÿ’  -->  codegolf.stackexchange.com/users/ÿ
```
Whereas `ÿ` is the current element of the iterator (using string interpolation) [Try it online!](https://tio.run/nexus/05ab1e#ATAAz///MTIwMTIg4oCZxpLDi8Wgy4Yuw4LigJrigLnCui7FksWSL@KAoMWhL8O/4oCZ//8 "05AB1E – TIO Nexus")
After constructing the link, `.w` reads all data from the link, resulting into a huge amount of text. To scrape the reputation from this, we need to split on the string `title="reputation"`. Or in a more compressed version: [`’„Ö="Âˆ"’`](https://tio.run/nexus/05ab1e#@/@oYeajhnmHp9kqHW463aYE5P7/DwA). Split on this piece of string (with `¡`) and get the second element (with `1è`) and keep the first **100 characters** (with `т£`).
Now, our scraped text looks a bit like this:
```
>
        139,883 <span class="label-uppercase">reputation</span>
   </div>
   
<div class="ba
```
This part is easy, we just remove anything **but digits** to remain the reputation number, for which we have a builtin (`þ`). We end the loop and wrap everything into an array `}})`.
Finally, we can go on to processing the reputation numbers:
```
ZQā*O<“D M·‡“#è   -   On stack: an array in the format [Dennis rep, Martin rep]
Z                 # Get the maximum of the array
 Q                # Check for equality with the array
  ā*              # Multiply by it's index (1-indexed)
    O<            # Sum and decrement by 1
      “D M·‡“#    # Push the array ['D', 'M', 'tie']
              è   # Get the element on the index of the sum
```
Which results in either `D`, `M` or `tie`.
[Answer]
# PowerShell v3+, ~~147~~ ~~123~~ ~~119~~ ~~103~~ ~~101~~ 96 Bytes
```
$a,$b=irm api.stackexchange.com/users/12012`;8478?site=codegolf|% I*|% r*n;$a-$b|% T*g "D;M;Tie"
```
Saved 24 bytes using true/false output instead of the names.
Saved another 4 by restructuring the final checks.
saved 16 by getting only the reputations of the two users from the request, saves having to use the `|% r*n` more than once, also means we can get rid of like a million brackets, and two useless variables.
-2 thanks to [TessellatingHeckler](https://codegolf.stackexchange.com/users/571/tessellatingheckler) - using an escape char instead of two doublequotes for the url, also removed the `@` from the array which was un-needed (oopsie)
used a weird `.ToString` trick I never knew existed until now reccomended by [TessellatingHeckler](https://codegolf.stackexchange.com/users/571/tessellatingheckler) -5, and finally below 100.
---
Version which returns names:
```
$a,$b=irm "api.stackexchange.com/users/12012;8478?site=codegolf"|% I*
if(($c=$a|% r*n)-eq($d=$b|% r*n)){"tie"}else{@(($a|% d*),($b|% d*))[$c-lt$d]}
```
this looks pretty messy due to the shortening of parameter names.
anywhere `|% r*n` appears we're getting the `ReputatioN`, and `|% d*` is the `Display_name`
uses `Invoke-RestMethod` (alias `irm`) to query the API, stores the result named `Items` (gotten using `|% I*`), into the two variables `$a` & `$b`, one for each pro golfer's, the `ToString` (`|% T*g`) trick results in one of the values `D`,`M` or `Tie` if the number is odd/even/zero.
[Answer]
# [Python 2](https://docs.python.org/2/), 160 bytes
```
from requests import*
print cmp(*[get('http://api.stackexchange.com/users/12012;8478?%ssite=codegolf&filter=!9aK21rboZ'%s).text for s in'order=asc&',''])or'tie'
```
Not the shortest Python answer, but the shortest one so far that doesn't make any assumptions.
Prints `1` if Martin has more rep, `-1` if I do.
[Answer]
# JavaScript (ES6), ~~167~~ ~~156~~ ~~146~~ ~~144~~ ~~141~~ ~~132~~ 103 bytes
Stupid [`fetch`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) and its stupid, expensive [`Promise`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise) chaining!
Assumes, as currently allowed, that Dennis & Martin will always be the 2 top ranked users. Needs to be run from the root level of `api.stackexchange.com`. Returns a `Promise` object (as is now [permitted by consensus](https://codegolf.meta.stackexchange.com/a/12327/58974)) containing `tie` or the JSON object for whoever has the most rep at the time. If the JSON object isn't considered valid output then add 5 bytes for `.link`.
```
_=>fetch`users/?site=codegolf`.then(r=>r.json()).then(({items:[j,i]})=>j[r="reputation"]==i[r]?"tie":j)
```
* Saved 11 bytes thanks to [Kevin](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen) suggesting I return the profile `link` rather than the first letter of the `display_name`, which also provide better future-proofing against them changing their usernames to start with the same letter!
* 5 bytes saved adapting a tip from [kamoroso94](https://codegolf.stackexchange.com/users/57013/kamoroso94) on a another solution of mine.
---
## Try It
```
f=
_=>fetch`//api.stackexchange.com/users/?site=codegolf`.then(r=>r.json()).then(({items:[j,i]})=>j[r="reputation"]==i[r]?"tie":j)
f().then(console.log)
```
---
## Alternative
If a time comes that Dennis & Martin aren't at the top and we still want to know who has the most rep between them then we'd need the following, at a cost of an additional 10 bytes.
```
_=>fetch`users/12012;8478?site=codegolf`.then(r=>r.json()).then(({items:[j,i]})=>j[r="reputation"]==i[r]?"tie":j)
```
[Answer]
# Python 3, ~~160~~ ~~157~~ 151 bytes
```
from requests import*
a,b,*c=get('http://api.stackexchange.com/users?site=codegolf').json()['items']
r='reputation'
print(['tie',a['link']][a[r]>b[r]])
```
---
*-3 bytes thanks to @KevinCruijssen*
Prints a link to the user having more reputation
Assumes they are on #1 and #2
---
**Without making any assumptions, Python 2, 157 bytes**:
```
from requests import*
a,b=get('http://api.stackexchange.com/users/8478;12012?site=codegolf').json()['items']
r='reputation'
print['tie',a['link']][a[r]>b[r]]
```
[Answer]
# PHP, 167 Bytes
prints -1 for Dennis , 1 for Martin Ender. tie in case of a tie
```
<?=($b=($t=json_decode(gzdecode(join(file('http://api.stackexchange.com/users/12012;8478?site=codegolf&order=asc'))))->items)[0]->reputation<=>$t[1]->reputation)?:tie;
```
[Answer]
# Python, ~~226~~ ~~225~~ 221 bytes
I feel like this is too long.
```
import requests as r,re
def f(i):d=re.sub('[, ]','',r.get('http://codegolf.stackexchange.com/users/'+i).text);D=d.index('"reputation">')+14;return int(d[D:d.index('<',D)])
a=f('8478')
b=f('12012')
print([a>b,'tie'][a==b])
```
Prints `"True"` if Martin has more rep than Dennis, `"False"` if Dennis has more rep than Martin, and `"tie"` if they have the same (theoretically. I can't test this :P).
`https` -> `http` for 1 byte thanks to @KevinCruijssen!
`re as r, r.sub` -> `re, re.sub` for 4 bytes thanks to @ovs!
[Answer]
# Bash + [jq](https://stedolan.github.io/jq/), 140 133 bytes
```
w3m 'api.stackexchange.com/users/12012;8478?site=codegolf&sort=name'|jq '.items|map(.reputation)|1/(index(min)-index(max))'||echo tie
```
## Formatted and explained
First, we *curl* w3m the API (and use `--compressed`, or short `--com` to un-gzip):
```
w3m 'api.stackexchange.com/users/12012;8478?site=codegolf&sort=name'
```
That's some JSON. Notice the order ist stable, not based on reputation. JQ then processes the JSON, which is what it's made for.
```
.items                          # take the items array
| map(.reputation)              # extract only the reputations
| 1 / 
  (index(min)-index(max))       # This checks if the bigger value is first (1) or last (-1) in array
```
We use `1/x` above to generate an division-by-zero error when min==max, so in a tie situation. The `||echo tie` in bash catches that.
*Note that a warning is printed on stderr by JQ in that case, but we consider only stdout the actual result of the program ;)*
[Answer]
# [Python 2](https://docs.python.org/2/), ~~228~~ ~~223~~ ~~204~~ 199 bytes
I did this on a mobile hotspot so... it's not great... ~~Assumes both of them will always be in the same hundred thousand.~~ Doesn't assume anything now. :D
```
import urllib as l,re
f=lambda i:int(re.search('n">\s*([\d,]+)',l.urlopen('http://codegolf.stackexchange.com/users/%d'%i).read()).group(1).replace(',',''))
d,m=f(12012),f(8478)
print[d>m,'Tie'][d==m]
```
Prints `True` if Dennis has more reputation than Martin, `False` otherwise and `Tie` if they are... tied.
[Answer]
## [Stackexchange API Data Explorer](https://data.stackexchange.com), ~~184~~ 180 bytes
Thanks to @Kevin Cruijssen for -4 bytes
```
DECLARE @M int,@D int;SELECT @M=reputation from users where id=8478;SELECT @D=reputation from users where id=12012;IF @D=@M PRINT('tie')ELSE BEGIN;IF @D>@M PRINT(1)ELSE PRINT(2)END
```
Prints 1 for Dennis and 2 for Martin
Since i only [yesterday](https://codegolf.stackexchange.com/a/143116/56341) learned about the [SEADE](https://data.stackexchange.com) this should be very beatable.
[Try it here](https://data.stackexchange.com/codegolf/query/725157/martin-ender-versus-dennis)
]