- 問題のテキスト版は以下にあります。
- 問題のPDF版はhttp://dl.dropbox.com/u/3198071/a/math-orig-prob.pdf
- 解答のPDF版はhttp://dl.dropbox.com/u/3198071/a/math-orig-sol.pdf
- 問題のPDF版をGoogle Docsで閲覧 http://docs.google.com/viewer?url=http%3A%2F%2Fdl.dropbox.com%2Fu%2F3198071%2Fa%2Fmath-orig-prob.pdf
- 解答のPDF版をGoogle Docsで閲覧 http://docs.google.com/viewer?url=http%3A%2F%2Fdl.dropbox.com%2Fu%2F3198071%2Fa%2Fmath-orig-sol.pdf
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
sudo apt-get install haskell-platform | |
mkdir -p some/where/as/you/like | |
cd some/where/as/you/like | |
cabal install cabal-install | |
export PATH=$HOME/.cabal/bin:$PATH | |
cabal sandbox init | |
git clone git@github.com:pasberth/paradocs.git | |
cabal install ./paradocs | |
./.cabal-sandbox/bin/paradocs ./paradocs/doc/cheatsheet.pdoc > cheatsheet.html |
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
(* Proving soundness of STLC using autosubst https://www.ps.uni-saarland.de/autosubst/ *) | |
Require Import Autosubst MMap. | |
Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
(* our type - only booleans and functions *) |
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
perl -e '""!~("(?{".("{^(?)!(?^{^^!){.^^~~?}{!~}^}^.(!~}!..^^!~}!~~.~^}"^"^}((~))~~^{.{^~?}^!^}(~{^)?()^)^!).^}!()){.^)(}.("^"!~!{}(!(!~((}}!})!^^{^){(.?}{}!~{^~!)^?..(~)!~.?."^"{{?}^(~)~^!..~)??){^.~){.~(!{.)}}^.}^~}?}.^}(^?{~"^".)^!?^(.)!~!)~{^{(}){?!^.~)({?)(^.^!.^{((^!!^(^(!"^"!})^?}^(?^(~{.)(}})!.?^~!!{~))}({^^!..)^^~?{.?)..")."})")' |
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
code { | |
font-family: "Bitstream Vera Sans Mono", | |
"Courier New"; | |
} | |
pre { | |
margin-left: 1em; | |
font-family: "Bitstream Vera Sans Mono", | |
"Courier New"; | |
white-space: pre; | |
} |
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
````sii``s`k`s`k`si``s`k`s`kk``s`k``ss`kk``s`k``s`kks``s`k`s``s``s``si`k``si`k`k | |
i`k`````s``si``s``sss``ss`ki```ss``ssi``ss`ki``s`ksk``s`k`s``si`kik``s``si`k``s` | |
`s`ksk``s``s`k``s`ksk``s`ksk`k``s`ksk`k``````s``s`ks`ssi``ss`ki``s`ksk``s`k`s``s | |
i`kik``s``si`k`k``si`ki`k``s``si`ki`k``s``si`k`k``si`kk`k`````ss``s``sss``ss`ki` | |
`s`ksk``s`k`s``si`kik``s``si`k`k``si`ks`k```si```sii``s`k`si``sii``s`k`s``si`kik | |
`kk``s`kk``siii |
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
import socket | |
ss = socket.socket( | |
socket.AF_INET, socket.SOCK_STREAM) | |
ss.bind(('localhost', 8080)) | |
ss.listen(5) | |
conn, addr = ss.accept() | |
#conn.send("Hello World") | |
print conn.recv(4096) | |
conn.shutdown(socket.SHUT_RDWT) |
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
#-*- coding:utf-8 -*- | |
u''' | |
関数合成みたいな何か | |
''' | |
class Composable(object): | |
u''' | |
合成可能 | |
''' |
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
((lambda (A) A) 1) | |
-> compile -> | |
(frame (halt) (constant 1 (argument (close (A) (refer A (return)) (apply))))) | |
------- VM --------- | |
a - アキュムレータ 一時的な値を保存しておく | |
x - (今回実行するインストラクション [引数,...] (次に実行するインストラクション [引数,...] (...)) |
OlderNewer