Skip to content

Instantly share code, notes, and snippets.

View ympbyc's full-sized avatar
💭
Lisping in the mountains.

Minori Yamashita ympbyc

💭
Lisping in the mountains.
View GitHub Profile
@ympbyc
ympbyc / cv.md
Last active August 29, 2015 14:04
My resume

Minori Yamashita

916-462-2011 ympbyc@gmail.com 502 Cobble Creek Circle, Rocklin CA

Work History

DARUZEN, DARUMAZA FACTORY; BOSTON, US — 2014
@ympbyc
ympbyc / ekolu.js
Created March 26, 2015 09:20
ekolu sketch
window.Ekolu = (function () {
var ekolu = {};
ekolu.xyz = function (x, y, z) {
return {x: x, y: y, z: z};
};
ekolu._Thread = function (coordinates_system, pos_rot, ai, vision, visual) {
this.coordinates_system = coordinates_system || _.identity;
this.pos_rot = pos_rot || function (t) { return ekolu.xyz(0,0,0); };
this.ai = ai || [];
/*
* Author: 2015 Minori Yamashita ympbyc@gmail.com
*/
var origin = {x: 160, y:340};
var canvas = document.getElementById("space");
//http://stackoverflow.com/questions/9960908/permutations-in-javascript
function permutate (arr) {
return arr.reduce(function permute(res, item, key, arr) {
return res.concat(arr.length > 1
@ympbyc
ympbyc / 大事件ジェネレータ
Created September 29, 2011 10:22
なんかムラムラして作りました。 "ゆるゆり"の部分を任意の4文字で置き換えてください
(function (fc){
var c = fc.replace(/(.)(.)(.)(.)/, "$3っ$4っ$1っら・ら・ら・ら・$1$2$3$4、");
return c+c+c+"だ・い・じ・け・ん♪";
})("ゆるゆり")
@ympbyc
ympbyc / fact.jsl
Created October 9, 2011 03:35
JSLisp example
(define fact (lambda (x)
(if (== x 0)
1
(* x (fact (- x 1))))))
(alert (fact 5))
@ympbyc
ympbyc / fizzbuzz.scm
Created October 10, 2011 00:33
["simple answer for fizzbuzz writtern in JSLisp", "and the jscode code generated by the translator"]
(define fizzbuzz (lambda (i)
(if (== i 101)
""
(if (== (% i 15) 0)
(+ "fizzbuzz," (fizzbuzz (+ i 1)))
(if (== (% i 3) 0)
(+ "fizz," (fizzbuzz (+ i 1)))
(if (== (% i 5) 0)
(+ "buzz," (fizzbuzz (+ i 1)))
(+ (+ (String i) ",") (fizzbuzz (+ i 1))))
@ympbyc
ympbyc / fibbuzz.scm
Created October 14, 2011 01:38
fibbuzz in JSLisp
(define fib (lambda (n)
(fib_in n 0 1)))
(define fib_in (lambda (n p1 p2)
(if (== n 0)
p1
(fib_in (- n 1) (+ p1 p2) p1))))
(define fibbuzz (lambda (n)
(if (>= (= a (fib n)) 1000)
(String a)
@ympbyc
ympbyc / 0_gnomesort.jsl.scm
Created October 21, 2011 11:20
gnome sort in jslisp
(define swap (lambda (a b lis)
((. (vector) concat)
((. lis slice) 0 a)
(get lis b)
(get lis a)
((. lis slice) (+ b 1)))))
(define gnomesort (lambda (lis i)
(if (>= i (. lis length))
lis
@ympbyc
ympbyc / osakeCombinator.scm
Created November 10, 2011 16:13
Zコンビネータで酒が飲めるぞー!酒が飲める飲めるぞー!酒が飲めるぞー!
;汚い。気にしない。
(define Z (lambda (f) ((lambda (p)
(f (lambda (a) ((p p) a))))
(lambda (p)
(f (lambda (a) ((p p) a)))))))
(define sake (lambda (f)
(lambda (n)
(if (> n 12)
@ympbyc
ympbyc / Usage
Created November 24, 2011 13:18
Tweet the first line of the *terminal* buffer on double-clicks. (for nethack)
M-x term
nethack
M-x load-file
/path/to/nethackinTwitterer.el