http://morepypy.blogspot.com/2012/01/comparing-partial-evaluation-and.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
IGNORE: " "; | |
INTEGER: "0|[1-9][0-9]*"; | |
FLOAT: "(0|[1-9][0-9]*)\.[0-9]*"; | |
SYMBOL: "[a-zA-Z_-][a-zA-Z0-9_-]*"; | |
STRING: "\"[^\\"]*\""; | |
sexpr: SYMBOL | INTEGER | FLOAT | STRING | list; | |
list: "(" sexpr* ("." sexpr)? ")"; |
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 -*- | |
class CaseClassLike(object): | |
def __init__(self, **argd): | |
self.__dict__.update(argd) |
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
package aaaaa; | |
public class StaticClass | |
{ | |
public static String someValue = null; | |
public static void updateSomeValue(String value) | |
{ | |
someValue = value; | |
} |
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 -*- | |
import time | |
from pypy.module.thread import ll_thread | |
def add(x, y): | |
return x + y | |
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
class ListIter(object): | |
def __init__(self, target): | |
self.target = target | |
self.index = 0 | |
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
def main(args): | |
a = [] | |
a.append(10) | |
a.append([10]) | |
return 0 |
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
Config { font = "xft:Sans-9:bold", | |
bgColor = "black", | |
fgColor = "grey", | |
position = TopW L 80, | |
lowerOnStart = False, | |
commands = [ | |
Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10, | |
Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10, | |
Run Memory ["-t","Mem: <usedratio>%"] 10, | |
Run Swap [] 10, |
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
#include <iostream> | |
class A | |
{ | |
virtual void test(void) const | |
{ | |
std::cout << "class A" << std::endl; | |
} |
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
;; compilation-start をゴニョる | |
(defadvice compilation-start (before compilation-start-before (command &optional mode name-function highlight-regexp)) | |
(if (null name-function) | |
(setq name-function | |
(lambda (name) | |
(concat "*" | |
name | |
" \"" | |
command |