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
(ns tapl.core | |
(:require [instaparse.core :as insta])) | |
(def my-parser | |
(insta/parser | |
"<T> := 'true' | 'false' | '0' | | |
'succ'<space>T | 'pred'<space>T | 'iszero'<space>T | | |
'if'<space>T<space>'then'<space>T<space>'else'<space>T; | |
space := #'\\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 ClassName | |
(f :: int -> char -> float -> string) | |
(g :: void -> double)) | |
(struct StructName : [] | |
(n:int) | |
(s:string)) | |
(struct Klass : [ClassName, ] | |
(m:int) | |
(t:string)) | |
(add :: int(a) -> int(b) -> int |
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
(when window-system | |
(eval-safe | |
;; (add-to-list 'default-frame-alist '(alpha . (95 80))) | |
(add-to-list 'default-frame-alist '(foreground-color . "ivory")) | |
(add-to-list 'default-frame-alist '(background-color . "#2D0922")) | |
(add-to-list 'default-frame-alist '(cursor-color . "purple2")) | |
(set-face-background 'region "RoyalBlue4") | |
(set-face-background 'cua-rectangle "DodgerBlue4") | |
(set-face-foreground 'mode-line "white") | |
(set-face-background 'mode-line "#2d2d30") |
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
if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); | |
var container, stats; | |
var camera, scene, renderer; | |
var mesh; | |
init(); | |
animate(); |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | |
#define list_entry(ptr, type, member) container_of(ptr, type, member) | |
#define container_of(ptr, type, member) ({ \ |
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
;; 怒りのタイポ修正 | |
;; http://d.hatena.ne.jp/kitokitoki/20091124/p2 | |
(defun delete-word (arg) | |
"Delete characters forward until encountering the end of a word. | |
With argument ARG, do this that many times." | |
(interactive "p") | |
(delete-region (point) (progn (forward-word arg) (point)))) | |
;; http://d.hatena.ne.jp/kitokitoki/20091124/p2 |
OlderNewer