[ Launch: perlin anim ] 5096402 by josephg
This file contains 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 "stdafx.h" | |
#include "SDL.h" | |
#include "SDL_video.h" | |
enum Ingredients | |
{ | |
CARROT = 1, | |
CHEDDAR = 2, | |
CAPSICUM = 4, | |
FETTA = 8, |
This file contains 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 "stdafx.h" | |
#include "SDL.h" | |
#include "SDL_opengl.h" | |
#include "SDL_video.h" | |
#include <cmath> | |
enum Ingredients | |
{ | |
CARROT = 1, | |
CHEDDAR = 2, |
This file contains 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
s = net.createServer(function(c) { c.setEncoding('utf8'); c.on('data', function(data){console.log('packet: ', data)}); }) |
This file contains 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
canvas = document.getElementsByTagName('canvas')[0] | |
fpselem = document.getElementById 'fps' | |
canvas.width = 800 | |
canvas.height = 600 | |
gl = canvas.getContext('webgl') or canvas.getContext('experimental-webgl') | |
triBuf = gl.createBuffer() | |
gl.bindBuffer gl.ARRAY_BUFFER, triBuf | |
tverts = new Float32Array [ | |
0, 1, 0, 1,0,0, |
This file contains 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
$ ./a.out -b | |
Benchmarking... | |
benchmarking librope | |
did 500000 iterations in 157.574000 ms: 3.173112 Miter/sec | |
final string length: 5799 | |
benchmarking c string | |
did 500000 iterations in 1556.024000 ms: 0.321332 Miter/sec | |
final string length: 5799 |
This file contains 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
$ clang -framework CoreFoundation test.c | |
$ ./a.out | |
The string should be "a". It is "" |
[ Launch: Tributary inlet ] 5251135 by josephg
This file contains 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 console = {log: print}; | |
var iter; | |
var read = function(callback) { | |
iter = callback(); | |
iter.next(); // Start the function, and run until it blocks. | |
}; | |
var ondata = function(data) { | |
iter.send(data); |
This file contains 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
# This is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
import std; | |
backend s1 { | |
.host = "127.0.0.1"; |