Using the terminology from Mark Miller's "The Paradox of Partial Parametricity", this gist shows how you can build unabashed monadic promises on top of Q-like promises.
Given:
Q: Ref<t> → Promise<t>
| development: | |
| adapter: mysql2 | |
| encoding: utf8 | |
| database: my_database | |
| username: root | |
| password: | |
| apt: | |
| - somepackage | |
| - anotherpackage |
| os: linux | |
| node_js: '12' | |
| sudo: required | |
| env: DISPLAY=':99.0' | |
| dist: trusty | |
| addons: | |
| apt: | |
| update: true | |
| sources: | |
| - google-chrome |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>BroadcastWebSocket usage demo</title> | |
| </head> | |
| <body> | |
| <h1>BroadcastWebSocket usage demo</h1> | |
| <script> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Pure P2P messaging channel establishment: Advertiser</title> | |
| </head> | |
| <body> | |
| <h1>Pure P2P messaging channel establishment: Advertiser</h1> | |
| <script> |
Using the terminology from Mark Miller's "The Paradox of Partial Parametricity", this gist shows how you can build unabashed monadic promises on top of Q-like promises.
Given:
Q: Ref<t> → Promise<t>
| [My initial list:] | |
| DRM | |
| speed for superhi-perf games | |
| app store placement | |
| source-code secrecy | |
| [list compiled from other people's twitter answers; thanks all!] | |
| pushing native notifications when they're not in the "app" (several people said this) |
| function WindowController () { | |
| this.id = Math.random(); | |
| this.isMaster = false; | |
| this.others = {}; | |
| window.addEventListener( 'storage', this, false ); | |
| window.addEventListener( 'unload', this, false ); | |
| this.broadcast( 'hello' ); |
| /* | |
| * OrientationChange Event Shim | |
| * http://github.com/richtr | |
| * | |
| * Copyright (c) 2012, Rich Tibbett | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * |