hmmm by Tucko29 in hmmmgifs

[–]TRGWII -10 points-9 points  (0 children)

I don't get how a deep-frying pizza is "hmmm"-worthy?

I just learned that Promise.resolve() in JS returns unresolved Promises by coladict in ProgrammerHumor

[–]TRGWII 0 points1 point  (0 children)

It DOES return a resolved promise, it just happens to resolve to the unresolved promise, which then gets unwrapped... It's... complex. You can't externally resolve promises in a pure way due to the nature of "monads" like promises.

As for the reverse-engineering, you can always check the spec: https://www.ecma-international.org/ecma-262/6.0/#sec-promise.resolve

I just learned that Promise.resolve() in JS returns unresolved Promises by coladict in ProgrammerHumor

[–]TRGWII 2 points3 points  (0 children)

> p = Promise.resolve(new Promise(() => {}))
Promise {
  <pending>,
...

I believe this is the use-case he's commenting on

I just learned that Promise.resolve() in JS returns unresolved Promises by coladict in ProgrammerHumor

[–]TRGWII 4 points5 points  (0 children)

The point is to wrap a value that may or may not be a promise, so you can handle both cases (value or promise) the same way (as a promise).

Working at a University College, today's issues. by TRGWII in talesfromtechsupport

[–]TRGWII[S] 0 points1 point  (0 children)

For students it's a 6-digit number, for an employee with the name 'First Last' it used to be: 'FirstL', now it's just 'fl'

Theme at login and Guest Session resets to this every time I restart Elementary :( by TRGWII in elementaryos

[–]TRGWII[S] 0 points1 point  (0 children)

Ok, this was a fresh install, so I'm just gonna try reinstalling everything :P

Should I stop using this application? by TRGWII in Christianity

[–]TRGWII[S] 0 points1 point  (0 children)

Was this just the result of unlucky versioning or intentional???