---------- Forwarded message ----------
From: Mark S. Miller <[email protected]>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: [email protected]
#!/bin/bash | |
# get the absolute path of the executable | |
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") | |
# resolve symlinks | |
while [ -h $SELF_PATH ]; do | |
# 1) cd to directory of the symlink | |
# 2) cd to the directory of where the symlink points | |
# 3) get the pwd |
/** | |
* This file is licensed to you 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 | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
package main | |
import ( | |
"sdl" | |
"math" | |
"time" | |
"rand" | |
"flag" | |
"fmt" | |
) |
---------- Forwarded message ----------
From: Mark S. Miller <[email protected]>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: [email protected]
#include <stdio.h> | |
#define CONFIG_FOO 1 | |
#define CONFIG_NOO 0 | |
#define is_set(macro) is_set_(macro) | |
#define macrotest_1 , | |
#define is_set_(value) is_set__(macrotest_##value) | |
#define is_set__(comma) is_set___(comma 1, 0) | |
#define is_set___(_, v, ...) v |
package sync | |
import ( | |
"sync" | |
"sync/atomic" | |
) | |
type nullLocker struct {} | |
func (n *nullLocker) Lock() {} |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
set pc, kernel_start | |
:clock | |
dat 0xffff | |
:get_hardware; () -> void | |
hwn i | |
.loop | |
sub i, 1 | |
hwq i |
deps: | |
brew install md5sha1sum automake snappy hadoop | |
tweak OS X: | |
# export JAVA_HOME=$(/usr/libexec/java_home) | |
hack jvm: | |
# sudo mkdir -p ${JAVA_HOME}/lib/{i386,x86_64}/server | |
# sudo ln -s ${JAVA_HOME}/{../Libraries,lib/i386/server}/libjvm.dylib | |
# sudo ln -s ${JAVA_HOME}/{../Libraries,lib/x86_64/server}/libjvm.dylib |