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
//eg: bf('[bfcode]', {input: 'string', display: console.log}) | |
function bf (str, opt) { | |
opt = opt || {}; | |
var mem = new Array(); | |
var ptr = 0; | |
if (!! opt.input) opt.input = opt.input.split(''); | |
mem[0] = 0; | |
for (var i = 0; i < str . length; ++ i) { | |
switch (str[i]) { | |
case '+': |
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
class Instructions | |
class Refer extends Instructions | |
constructor : (@variable, @next) -> | |
class Close extends Instructions | |
constructor : (@parameter, @body, @next) -> | |
class Frame extends Instructions | |
constructor : (@x, @next) -> | |
class Constant extends Instructions | |
constructor : (@value, @next) -> | |
class Assign extends Instructions |
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 man page for ympbyc | |
.TH YMPBYC 1 | |
.SH NAME | |
ympbyc \- almost full-time programmer | |
.SH SYNOPSIS | |
.B ympbyc | |
.I [options] | |
.I text... | |
.SH DESCRIPTION | |
.I ympbyc |
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
function Ym (obj) { | |
// Ym() returns an instance of this Constructor | |
var Constructor = function (obj) { | |
if (obj) | |
for (key in obj) | |
if (obj.hasOwnProperty(key)) | |
this[key] = obj[key] | |
} | |
// Copy the prototype of the object given to our Ym object's prototype | |
// javascript 1.8.2 or lator |
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
exports.init = function () { | |
//ナビゲーショングループを入れるための空ウインドウ | |
var rootWin = Ti.UI.createWindow(); | |
this.connect('top', {'rootWin' : rootWin}); | |
} | |
function connect (windowName, cookie) { | |
var watcher, | |
next = function (controller) { | |
return function (cookie) { |
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
require 'regparsec' | |
module HTMLParsers | |
extend RegParsec::Regparsers | |
ValidTags = ->(state) { one_of(*state.valid_tags) } | |
OpenTag = between('<', '>', ValidTags) | |
CloseTag = between('</', '>', ValidTags) | |
Line = try /[^\<\n]+/, &:to_s |
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 _ = | |
(function () { | |
var _, Wrapper, result, breaker, slice; | |
breaker = {}; | |
slice = Array.prototype.slice; | |
Wrapper = function(obj) { this._wrapped = obj; }; | |
_ = function (obj) { obj=obj||{}; return new Wrapper(obj) } | |
result = function(obj, chain) { |
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
(setq my-key-map nil) ;;初期化しとく | |
(defun hello-world () (interactive) (message "hello world")) ;;なんでinteractiveが要るのかよくわかってない | |
(defun fuck () (interactive) (message "fuck")) | |
(defun hoge () | |
"function hoge" ;;説明? | |
(interactive) ;;この関数(hoge)は対話的に使う | |
(switch-to-buffer "*hackel*") | |
(if my-key-map nil ;;my-key-mapがnil以外(=真)なら何もしない |
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
(setq max-lisp-eval-depth 100000) | |
(setq max-specpdl-size 100000) | |
(setq debug-on-error t) | |
(defun compile (x next) | |
(cond | |
((symbolp x) (list 'refer x next)) ;;variables | |
((listp x) | |
(let ((code (car x)) (arg (cdr x))) |
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
;;;;; schel source ;;;; | |
'(((lambda_ (make-hook add-hook call-hook) | |
(call-hook (add-hook (make-hook) (lambda_ (e) | |
(schel message "%s" e) | |
e)) "hello")) | |
(lambda_ () (schel make-nil)) | |
(lambda_ (hook fn) | |
(schel cons fn hook)) | |
(lambda_ (hook data) | |
(if (schel null hook) (schel make-nil) |