These are chat archives for arenanet/api-cdi

8th
Mar 2017
Archomeda
@Archomeda
Mar 08 2017 00:31
my best fail ever:
const list = [];
if (list.length === 0) {
    return i18next.t('schedule:events.response-empty');
}
yes, no wonder why it always replied that there were no events scheduled.....
otoh i bet that code was super fast :D
Archomeda
@Archomeda
Mar 08 2017 01:06
oh yes
blazingly fast
windwarrior
@windwarrior
Mar 08 2017 09:19
A good compiler would be like, "I don't need this branch"," can delete the const", "inline the function", O(1)
but I dont know how good modern day Javascript JIT's are
darthmaim
@darthmaim
Mar 08 2017 09:24
The problem is that those optimizations are too slow, I think V8 does them only for code paths that get called often
The problem is that js is not compiled ahead of time where you have all the time in the world do optimize
Some minifiers can do it though
windwarrior
@windwarrior
Mar 08 2017 09:31
yeah, almost all Javascript JITs are two staged
having a naïve compilation for code thats called infrequently
and optimising code that is on a hot path
I also like how @Archomeda triple equals checks whether the lenght of that list is 0
as if javascripts length is gonna return a float
windwarrior
@windwarrior
Mar 08 2017 09:39
would be great to have a visualisatoin of what code your JS JIT considered to be so hot that it optimised it
David Reeß
@queicherius
Mar 08 2017 10:14
i usually use node --trace_opt, but it's pretty poor DX, would be cool to have a pretty tool for it
hmm random thought
should stored furniture be made available separately from guild consumables
i'm thinking about just lumping them together :/
eh probably should make them separate, e.g. /v2/guild/:id/consumables and /v2/guild/:id/decorations
Archomeda
@Archomeda
Mar 08 2017 20:29
:tada:
@queicherius did you totally turn off /v2/guild/:id/teams because i'm not seeing errors for it anymore
actually i'm not seeing any errors on live at all
which is unusual
windwarrior
@windwarrior
Mar 08 2017 20:57
how can this be, bugfree code
Jonathan Andrist
@rwfrk_twitter
Mar 08 2017 22:43
I thought we voted NO PROFESSION LOCKING ? o.o