- Haskellは天才過ぎて大学行ってる15歳
- Coqさんはフランス生まれの留学生
- Haskell たんと友達
- RubyはモテモテJK
- Pythonは真面目委員長、風紀委員
- LISPは部活
- Common Lisp 先輩(ガサツ) (良いビッチ)
- Scheme ちゃん (黒髪JK) (悪いビッチ)
- Clojure たん (黒髪JK) (清楚) (処女)
- Emacs Lisp 様(部長
This file contains hidden or 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
--ちんちんっぽいことするやつ | |
import System.Random | |
chimpo :: String -> IO String | |
randomString :: String -> IO String | |
chimpo c = do s <- randomString c | |
if take 4 c == "ABCDE" | |
then return $ c ++ ("なんか終わりました" ++ (show (length c ))) | |
else chimpo s |
This file contains hidden or 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 DoNotation | |
class DSL | |
def initialize(&block) | |
@first_lets = [] | |
@proc_sources = [] | |
@variables = Hash[] |
This file contains hidden or 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
{-# LANGUAGE TemplateHaskell #-} | |
import Control.Lens | |
-- 基本となるオブジェクト | |
data Obj = Obj { | |
_pos :: Int | |
} deriving (Show) | |
-- Obj型のオブジェクトをもつ抽象的なクラスHasObjを作る | |
makeClassy ''Obj |
This file contains hidden or 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
(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)] |
This file contains hidden or 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
````sii``s``s`ks``s`k`s`ks``s``s`ks``s`kk``s`ks``s`k`s``s`k``si`kk``s``s``si`kk | |
`k``si`k`ki`k````s``s`kski```s``s`ksk``s``s`kski````s``siii``s``s`kski``s`k`s`` | |
si`kik``s``si`k``s``s`ksk``s``s`ks``s`kk``s`ksk`k``s`ksk`k`````s``s`ksk``s``s`k | |
ski``s``s`kski``s`k`s``si`kik``s``si`k`k``si`ki`k``s``si`ki`k``s``si`k`k``si`kk | |
`k````s``s`ksk``s`k``s``s`kski``s``s`ksk``s``s`kski``s`k`s``si`kik``s``si`k`k`` | |
si`ks`k```sii``s`k``s`k`s``si`kik``sii``s`kk``sii`kk`k`k``si`k`kii |
This file contains hidden or 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
# coding: utf-8 | |
@eip = 0 | |
@before_bracket = 0 | |
@is_skip = false | |
@memory = Array.new(30000) { 0 } | |
@pointer = 0 | |
# http://ideone.com/3Ev4dC このプログラム動いたっ | |
code = ">>>>>>>>>>>>+++[-<+++++>]<[-<<<<<<<<<<<+++++>+++++++>+>++++++++++++++>+++++++++++>+++++++++>++>++++++++++++>++++++++++++++>++++++++++>+++++++>]<++++++<---<----<+++++<++<---<++<++++++<-----<----<---.>.+++++++..+++.>.>.>.<+.>>.<<-.>++++++++++++.<+.>>.<<-.>------------.<+.>>+.>.<<<-.>>>>.<<<<+.>>-.<<.>>++++++.<<.>>-------.<<.>>++.<<<.>+++++++++++.>>>>++++.<<<-------.<+.>+++++.>>>.<<<<<.<<-.>.----------.-.+.-.---.++++++.>.<<-----.>++++++++.-.----.+++++.++++++.---.>.>>>>>>.>.<.<--------.>.<++++.>.<<<<+++++++.>>+.<<<<.>-----.>--------.++++.<.>----.++++++++++.<.>----------.>>>-.<<<<.>+.>++++++++.<<.>-..<.>+.>------.<<<.<<+.>---------.--------.>>>>>>>>>.<<<<<<<<.>+++.>>------.>>>>.<<<<<<.>>+.>>>>.<<<<<<.>>-.<++++++.<.>>.<----------.<.>>.>>---------.<<<<<.>+++++++++.>------------.-------------.<-.>---.>>>>>++.<<<<<<++.>>>>>>.+++.<<<<<<-.>++++++.>>>--.<<<<-.>.---.< |
This file contains hidden or 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
vm'' vmState@(VM a ThawInst _ (val:r) s mem) = do | |
case a of | |
(Thunk body envRef) -> do | |
S.put vmState { | |
vmInst = body | |
} | |
vm' -- 再帰 | |
newVMState <- S.get | |
S.put newVMState { | |
, vmEnvMem = -- なんかenvmem更新する処理 |
This file contains hidden or 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
module FizzBuzz | |
{ | |
export var doFizzzBuzz = function (n : number) | |
{ | |
var fb = new FizzBuzz (new Fizz (new Buzz (null))) | |
var table = document.createElement ("table") | |
document.body.appendChild (table) | |
for (var i = 1; i <= n; i++) | |
{ | |
var row = document.createElement ("tr") |
This file contains hidden or 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 10000) | |
(setq max-specpdl-size 10000) | |
(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))) | |
(cond |
NewerOlder