This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
'use strict'; | |
(function() { | |
const shmem = new SharedArrayBuffer(1024 * 100000); // 25600000 | |
const sync = new Int32Array(shmem); | |
const cores = [...new Array(navigator.hardwareConcurrency)]; | |
const sync_shift = cores.length; | |
const core_shift = (sync.length - sync_shift) / sync_shift; | |
let doneCount = 0; |
var fPrev, fCurr; | |
function fib (n) { | |
var result; | |
if (n < 0) throw Error('invalid given number'); | |
if (n <= 1) { | |
return n; | |
} |
This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal
AppCache
(and possibly ServiceWorker
).As suggested on one of the Google Developers sites, one may use search params in start_url
of the manifest.json
to notify page about that it was launched in standalone mode: start_url: '/?standalone'
.
This works well unless your page uses AppCache
(or ServiceWorker
). In case of AppCache
, every url with different search params is treated as separate entry in cache. So if you have listed /
path in AppCache
and naively used start_url: '/?standalone'
in your manifest.json
, then your Web App won't work offline from the Home Screen.
_With ServiceWorker
, however, there is few ways to fix this directly in its code, like ignoreSearch
option for match()
method (currently not supported in Chromium) or just traversing cache entries manually and comparing new URL(event.request.url).pathname
with stored request `new URL(...).path
Helpful Migration Guides:
var StateMachine = { | |
// Register valid states for this object. | |
__states__: { | |
'success': ['failure'], | |
'failure': ['success'] | |
}, | |
// Set initial state. | |
__state__: 'success', |
function maybe(value) { | |
var obj = null; | |
function isEmpty() { return value === undefined || value === null } | |
function nonEmpty() { return !isEmpty() } | |
obj = { | |
map: function (f) { return isEmpty() ? obj : maybe(f(value)) }, | |
getOrElse: function (n) { return isEmpty() ? n : value }, | |
isEmpty: isEmpty, | |
nonEmpty: nonEmpty | |
} |
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |