Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus| (function(global) { | |
| var types = function(obj) { | |
| throw new TypeError("fmap called on unregistered type: " + obj); | |
| }; | |
| // inefficient as hell, but as long as there aren't too many types.... | |
| global.Functor = function(type, defs) { | |
| var oldTypes = types; | |
| types = function(obj) { | |
| if (type.prototype.isPrototypeOf(obj)) { |
| ////// Save as index.js and upload it to Lambda as zip archive with node_modules directory. After: | |
| ////// npm install aws-cloudwatch-chart | |
| ////// npm install request | |
| ////// no need to upload aws-sdk module | |
| ////// Don't forget to change API keys here. | |
| ////// License: MIT | |
| ////// Docs: |
| # Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
| # Change example.com (server_name) to your website url | |
| # Change /path/to/your/root to the correct value | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /path/to/your/root; | |
| index index.html; |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
Note This is a little out of date. Rust has made some progress on some points, however many points still apply.
Swift shares Rust's enthusiasm for zero-cost abstractions, but also emphasizes progressive disclosure. Progressive disclosure requires that language features should be added in a way that doesn't complicate the rest of the language. This means that Swift aims to be simple for simple tasks, and only as complex as needed for complex tasks.