This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _malloc_signed(initial_value): | |
SIGNEDP = lltype.Array(lltype.Signed) | |
value = lltype.malloc(SIGNEDP, 1, flavor="raw") | |
value[0] = initial_value | |
return value | |
----------------------------------------------------------------------------------------------- | |
[translation:info] assert not signature.has_kwarg() # XXX should not happen? | |
[translation:ERROR] AssertionError | |
[translation:ERROR] Processing block: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make wlvlang-jit PYPYPATH=~path/to/pypy | |
# This should pass | |
make test_all_jit | |
# Unfortunately the path to the script needs to be relative! (I should fix that) | |
bin/wlvlang-jit tests/benchmarks/thread-ring.wl 10 10 | |
# This should cause a segfault or: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void test_vec(double* restrict a, double* restrict b) { | |
int i; | |
double *x = __builtin_assume_aligned(a, 16); | |
double *y = __builtin_assume_aligned(b, 16); | |
for(i = 0; i < SIZE; i++) { | |
x[i] = x[i] + y[i]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
def pythonpath(): | |
# Remove filter if you don't care about cases such as: ':/path::', where members of the path are | |
# empty. It would be slightly faster to complete this operation if the filter was not run but the size of the | |
# input is likely to be small | |
os.pathsep.join(filter(lambda path: len(path) > 0, sys.path)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "course.module" | |
PROC producer(VAL INT start, step, CHAN OF INT c!) | |
INT count: | |
SEQ | |
count := start | |
WHILE TRUE | |
SEQ | |
c ! count | |
count := count + step |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#INCLUDE "course.module" | |
PROTOCOL CONTROL | |
CASE | |
poison | |
: | |
PROTOCOL TAGGED.INT | |
CASE | |
normal; INT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DOM Recycler</title> | |
<style> | |
/* Styles not relevant to scrolling (just to make the demo look neat and tidy) */ | |
body { font-family: sans-serif; -webkit-text-size-adjust: 100% } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
var resolvedPolyfills = {}; | |
polyfills.forEach(function(polyfill) { | |
resolvers.forEach(function(resolver) { | |
resolver(polyfill).forEach(function(targetPolyfill) { | |
resolvedPolyfills[targetPolyfill.name] = targetPolyfill | |
}) | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Not global: | |
npm ls -p --depth=0 | awk -F/node_modules/ '{print $2}' | grep -vE '^(npm)$' | xargs npm rm | |
# Global: | |
npm ls -gp --depth=0 | awk -F/node_modules/ '{print $2}' | grep -vE '^(npm)$' | xargs npm -g rm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set up key for github | |
make sure brew is installed | |
make sure git is installed with brew | |
(Sourcetree issues..) Use HTTPS (Auth issues are just too much) Github for Mac | |
git clone at the command line? | |
try `sudo gem install ruby` if failed: | |
rvm install ruby |
OlderNewer