• 0 Posts
  • 10 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle



  • If you used regular filesystem moves, p4 may have registered them as separate deletes and adds. Depending on workspace configuration, Perforce may not propagate deletes from the depot, so old copies might be left behind. Always move files in a workspace using P4V, your Perforce plugin, or the p4 mv command to ensure file continuity. If done properly, this will appear as add/move and delete/move.

    But if things aren’t showing up in new places, it’s likely you referred some things you didn’t mean to or didn’t commit everything. Check to see if you still have anything checked out. Also worth noting that empty directories don’t exist as far as Perforce is concerned.





  • If you use JavaScript, you’ve probably seen a monad, since Promise is a monad. Unit is Promise.resolve(), bind is Promise.then(). As required, Promise.resolve(x).then(y) === y(x) (unit forms a left identity of bind), y.then(Promise.resolve) === y (unit forms a right identity of bind), and x.then(y.then(z)) === x.then(y).then(z) (bind is essentially associative).

    You even have the equivalent of Haskell’s fancy do-notation (a form of syntactic sugar to save writing unit and bind all over the place) in the form of async/await. It’s just not generalized the way it is in Haskell.


  • The Danish word for 99 is nioghalvfems, which literally means “nine and half five.” Which you could be forgiven for assuming meant 11½. The trick is that a) “half five” actually means 4½, as in half less than five, and b) it’s implied that you’re supposed to multiply the second part by 20. So the proper math is 9 + (-½ + 5) * 20 = 99.