These are chat archives for arenanet/api-cdi

6th
Jun 2016
Christian
@zeeZ
Jun 06 2016 15:11
"hmm I kinda wanna expand those elements... yeah I'm gonna expand those elements, just gotta move the cursor... hey wait a minute!"
the process of opening an image, forgetting it's an image, and then remembering it's an image..
smiley
@codemasher
Jun 06 2016 15:54
re preloading data with fetch and respecting the promises: https://davidwalsh.name/promises
var userCache = {};

function getUserDetail(username) {
  // In both cases, cached or not, a promise will be returned

  if (userCache[username]) {
      // Return a promise without the "new" keyword
    return Promise.resolve(userCache[username]);
  }

  // Use the fetch API to get the information
  // fetch returns a promise
  return fetch('users/' + username + '.json')
    .then(function(result) {
      userCache[username] = result;
      return result;
    })
    .catch(function() {
      throw new Error('Could not find user: ' + username);
    });
}
another idea is Object.observe() which i've used before
just observe the object and don't care at all for when the response comes in
@codemasher FWIW, this is my WIP promise-based API wrapper that I'm using for stuff: https://gist.github.com/lye/42c77faef2071d56720ce59c657cfa54
wow thx for inlining the first 30 lines of a 600 line snippet gitter
windwarrior
@windwarrior
Jun 06 2016 17:27
it does linkify inside a code thing
I did a [`thing`](url)
I don't think it linkifies in a code thing by default http://google.com
windwarrior
@windwarrior
Jun 06 2016 17:28
ohh waauw
Christian
@zeeZ
Jun 06 2016 17:28
nobody uses http anymore :P
windwarrior
@windwarrior
Jun 06 2016 17:28
right
urgh, its 30°C/86°F/303°K in my room
waaay.too.warm :'(
smiley
@codemasher
Jun 06 2016 17:31
@lye i find Object.observe super useful, esp. with the objectives ;)
windwarrior
@windwarrior
Jun 06 2016 17:32
is that like java's observer/observable but more automagic?
Pat Cavit
@tivac
Jun 06 2016 17:32
Object.observe was never broadly supported and of dubious real-world value
smiley
@codemasher
Jun 06 2016 17:33
at least there are some useful polyfills remaining
windwarrior
@windwarrior
Jun 06 2016 17:34
wait, the one on MDN is like deprecated, but the link you provide is es7 material?
darthmaim
@darthmaim
Jun 06 2016 17:35
@codemasher link is old
smiley
@codemasher
Jun 06 2016 17:35
read it :P
windwarrior
@windwarrior
Jun 06 2016 17:35
ah right
red flashing warning blindness
smiley
@codemasher
Jun 06 2016 17:35
ikr
for an (insane) example, see my above link to the location tracker
Archomeda
@Archomeda
Jun 06 2016 17:47
urgh, rich veins reset on daily reset, but if you somehow end up in the map instance it still remembers it that you farmed it from there; if you enter a different instance it's fine....
Archomeda
@Archomeda
Jun 06 2016 17:53
annoying 24h timer -.-
smiley
@codemasher
Jun 06 2016 18:16
uhh, @lye is it somehow possible to add the /v2/files id to the objectives in case they have no icon marker?
i'm looking for a clean way to associate the riuns icons
I just used a mapping :/
smiley
@codemasher
Jun 06 2016 18:22
meh
Open an issue for it and I'll get around to it at some point
smiley
@codemasher
Jun 06 2016 18:22
heh, ok
There's some nasty edgecases w.r.t EOTM objectives but w/e
smiley
@codemasher
Jun 06 2016 18:22
i'm currently at these... :vomit:
also, wvw maps in general seem to be a mess
whats with those new maps? are these separate?
and the continent_rect and labels are a mess
oh, i see there's already #308 on this mess - any connection?
I have no idea why that coordinate is wrong
It's assigned to the right sector and that sector has the right coordinates
smiley
@codemasher
Jun 06 2016 18:53
maybe same with the wvw region label
Christian
@zeeZ
Jun 06 2016 19:48
the whole map and floors thing is a clustermess anyway
smiley
@codemasher
Jun 06 2016 19:59
...
Eearslya Sleiarion
@Eearslya
Jun 06 2016 20:43
There must be a faster way to calculate 5.7 million md5sums
Curse you, advent of code
@codemasher neat
@Eearslya why are you calculating MD5s?
darthmaim
@darthmaim
Jun 06 2016 20:48
Eearslya Sleiarion
@Eearslya
Jun 06 2016 21:04
^ correct
I don't like that my program is taking 3.8s to do it but I really can't optimize it any more at this point
unless there's some obscure rule to MD5 that means I can skip numbers
smiley
@codemasher
Jun 06 2016 21:08
(now with fixed layer controls)
Eearslya Sleiarion
@Eearslya
Jun 06 2016 21:16
9.95 million md5sums actually
smiley
@codemasher
Jun 06 2016 21:32
got hold of the linkedin db dump?
smiley
@codemasher
Jun 06 2016 22:01
codemasher/Guild-Wars-2-WikiMaps@28a020f
smiley
@codemasher
Jun 06 2016 23:03
never satisfied. they wanted zone bounds, they got zone bounds. now they complain, that the lines cross sometimes. http://wiki-de.guildwars2.com/index.php?title=GW2Wiki_Diskussion:Projekte/Interaktive_Karten&diff=next&oldid=359949