Download R here.
Run R. You will be greeted by the R console. You can interactively type in commands and it will respond, allowing you to experiment quickly.
/* Converts any Io method (You'll have to wrap CFunctions in an Io method for those to work) to continuation passing style */ | |
/* This is working code, not code someone posted asking for help. Feel free to use how you want, public domain. */ | |
Object convertToCPS := method(str, | |
m := self getSlot(str) | |
blk := Block clone | |
blk setArgumentNames(getSlot("m") argumentNames append("__k")) | |
blk setMessage(Message clone fromString("__k call(self performWithArgList(\"#{str}\", call evalArgs append(__k)))" interpolate)) | |
self setSlot("#{str}CPS" interpolate, blk setIsActivatable(true)) | |
) |
WEBGL MODULE: ../lib/webgl.js | |
create program passed! ( {"id":1} ) | |
create shader passed! ( {"type":35633,"id":2} ) | |
create shader passed! ( {"type":35632,"id":3} ) | |
shader source passed! ( ) | |
shader source passed! ( ) | |
compile shader passed! ( ) | |
compile shader passed! ( ) | |
attach shader passed! ( ) | |
attach shader passed! ( ) |
app.get('/help', function(req, res){ | |
res.send('some help'); | |
}); | |
app.get('/search/:query/p:page', function(req, res){ | |
var query = req.params.query | |
, page = req.params.page; | |
res.send('search "' + query + '", page ' + (page || 1)); | |
}); |
Download R here.
Run R. You will be greeted by the R console. You can interactively type in commands and it will respond, allowing you to experiment quickly.
// To test on Ubuntu, install the requirements to build | |
// `apt-get install libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libgles2-mesa-dev` | |
// Then load the node libraries needed `npm install sdl webgl` | |
// Then run this script! | |
SDL = require('sdl'); | |
gl = require('webgl'); | |
SDL.init(SDL.INIT.VIDEO); | |
var screen = SDL.setVideoMode(640, 480, 0, SDL.SURFACE.OPENGL); |
#!/usr/bin/env ruby | |
#/ Usage: <progname> [options]... | |
#/ How does this script make my life easier? | |
# ** Tip: use #/ lines to define the --help usage message. | |
$stderr.sync = true | |
require 'optparse' | |
# default options | |
flag = false | |
option = "default value" |
webserver: webserver.c libuv/uv.a http-parser/http_parser.o | |
gcc -I libuv/include \ | |
-lrt -lm -lpthread -o \ | |
webserver webserver.c \ | |
libuv/uv.a http-parser/http_parser.o | |
libuv/uv.a: | |
$(MAKE) -C libuv | |
http-parser/http_parser.o: |
#!/bin/sh | |
/usr/bin/osascript > /dev/null <<ASCPT | |
set stdinText to "$(cat | sed -e 's/\\/\\\\/g' -e 's/\"/\\\"/g')" | |
set recName to "Nik Cubrilovic" | |
set recAddr to "[email protected]" | |
set theSubject to "Email from standard input" | |
tell application "Mail" | |
-- load the luajit ffi module | |
local ffi = require "ffi" | |
-- Parse the C API header | |
-- It's generated with: | |
-- | |
-- echo '#include <SDL.h>' > stub.c | |
-- gcc -I /usr/include/SDL -E stub.c | grep -v '^#' > ffi_SDL.h | |
-- | |
ffi.cdef(io.open('ffi_SDL.h', 'r'):read('*a')) | |
-- Load the shared object |
## SCROLL DOWN FOR THE RACE, THE FOLLOWING IS JUST UTILITY FROM COMMONLY USED CODE. | |
# Author:: Mohammad A. Ali (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2008 eSpace, Inc. | |
# License:: Distributes under the same terms as Ruby | |
require 'fiber' | |
class Fiber |