duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
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 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.
Syntax emits zero JavaScript.
type RESULT = VM<
[
["push", N_1], // 1
["push", False], // 2
["peek", _], // 3
just the bare necessities of state management.
Hotlink it from https://unpkg.com/valoo
.
// Start `node d3-server.js` | |
// Then visit http://localhost:1337/ | |
// | |
var d3 = require('d3'), | |
http = require('http') | |
http.createServer(function (req, res) { | |
// Chrome automatically sends a requests for favicons | |
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't | |
// fixed or this is a regression. |
'use strict'; | |
todomvc.controller('TodoCtrl', [ '$scope', 'todoFactory', 'filterFilter', | |
function OtherCtrl($scope, todoFactory, filterFilter) { | |
$scope.todos = todoFactory.getAllTodos('todos'); | |
$scope.newTodo = ''; | |
$scope.editedTodo = ''; | |
$scope.addTodo = function() { | |
todoFactory.addTodo($scope.newTodo); | |
}; | |
$scope.editTodo = function(todo) { |
// this is now a module: | |
// https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines-- | |
var template = require('backtick-template'); | |
// just string | |
const info = 'template'; | |
`some ${info}` === template('some ${info}', {info}); |
{-# LANGUAGE TypeOperators, NoImplicitPrelude #-} | |
import qualified Data.List as L | |
import Control.Arrow | |
import Control.Monad | |
import Prelude (Bool, Int, Float, fst, snd, flip, ($), uncurry, Show(..), String, (.), otherwise, IO) | |
import qualified Prelude as P | |
data s :. a = !s :. !a | |
infixl 1 :. |
npm install -g jspm@beta
jspm init
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
/** | |
* Inspired by XRegExp via 2ality | |
* http://www.2ality.com/2012/12/template-strings-xregexp.html | |
* http://xregexp.com/ | |
*/ | |
import test from 'ava'; | |
export function rx(flags) { | |
const trailingComments = /\s+#.*$/gm; |