- install homebrew
- place
autoconf.rbinto Formula folder:/usr/local/Library/Formula/ - run
brew install autoconf
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| exports[key] = value for key, value of { | |
| run : run | |
| document : document | |
| parse : parse | |
| resolveSource : resolveSource | |
| version : version | |
| defaults : defaults | |
| languages : languages | |
| } |
| # Enviroment setup | |
| # Path vars | |
| set -gx PATH /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin | |
| set -gx PATH /opt/homebrew/bin $PATH | |
| set -gx PATH $PATH $HOME/.local/bin | |
| set -gx PATH $PATH $HOME/.cargo/bin | |
| set -gx PATH $PATH $HOME/.yarn/bin |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.| #!/bin/bash | |
| emcc sin.cpp -o sin.js \ | |
| -s EXPORTED_FUNCTIONS="['_Sin_constructor','_Sin_destructor','_Sin_setFrequency','_Sin_setAmplitude','_Sin_getFrequency','_Sin_computeBuffer']" | |
| cat sin-proxy.js >> sin.js |
| ZIP,LAT,LNG | |
| 00601,18.180555, -66.749961 | |
| 00602,18.361945, -67.175597 | |
| 00603,18.455183, -67.119887 | |
| 00606,18.158345, -66.932911 | |
| 00610,18.295366, -67.125135 | |
| 00612,18.402253, -66.711397 | |
| 00616,18.420412, -66.671979 | |
| 00617,18.445147, -66.559696 |
| let let = macro { | |
| rule { async $vars ... = $fname ... ($params ...); $rest ...} => { | |
| $fname ... ($params ..., function (err, $vars ...) { | |
| if (err) throw err; | |
| $rest ... | |
| }) | |
| } | |
| } | |
| var buffer = new Buffer(1024); |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns on recent CPU
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 µ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 4X memory
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);