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 / html.rb
Created June 25, 2012 17:18 — forked from pasberth/html.rb
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
@ympbyc
ympbyc / shibuya-el-position-paper.md
Created August 19, 2012 07:32 — forked from ainame/shibuya-el-position-paper.md
shibuya.elのポジションペーパーです。githubアカウントをお持ちの方はforkしてお使いください。

Shibuya.el#1 ポジションペーパー

Personal

  • 山下実則

    • やました みのり
  • Twitter or Facebookのアカウント or HN等

  • @ympbyc

@ympbyc
ympbyc / LISP.hs
Created October 6, 2012 10:10 — forked from pasberth/LISP.hs
Haskell で lisp とか実装してみる(まだ動かない)
module LISP where
import Text.ParserCombinators.Parsec
import Control.Monad.State
data Value = Sym Identifier
| Int Int
| Str String
| List [Value]
| Closure [Identifier] Expr Env
@ympbyc
ympbyc / FRP.js
Created December 18, 2012 14:48 — forked from anonymous/FRP.js
require('allthemagicalstuff');
//event object constructor;
function event (target, eventName) {
return {
target: target
, eventName: eventName
};
};
@ympbyc
ympbyc / monad.js
Created December 23, 2012 04:50 — forked from hiratara/monad.js
// IO a -> a
function unsafePerformIO (io) {
var tuple = io({"memo" : "This is the real world!!"});
var newWorld = tuple[0];
var value = tuple[1];
return value;
}
// IO a -> (a -> IO b) -> IO b
function bind (io1, f) {
@ympbyc
ympbyc / monad.scm
Last active December 14, 2015 10:49 — forked from pasberth/monad.scm
(define (then m k)
(bind m (lambda (_) k)))
(define (state-unit a)
(lambda (s) `(,a ,s)))
(define (state-bind m k)
(lambda (s)
(let* { [r (m s)]
[a (car r)]
@ympbyc
ympbyc / emacs-biwa.el
Last active May 18, 2020 01:55 — forked from BilalQadri/emacs-biwa.el
Biwascheme from Emacs (with repl)
;; Initialize Biwascheme interpreter on frontend(browser) then send and receive expressions with websocket client
;; INSTALL websocket.el, LOAD this file and RUN interactive function `load-ws` from Emacs
;; ws-close to close server
;; send expression (e.g functions) to browser with `C-c C-s` ... Tip# cursor should be on function name
(require 'websocket)
(require 'scheme)
(defun biwa-start ()
(interactive)
;(load-file "~/.emacs.d/websocket.el")