Skip to content

Instantly share code, notes, and snippets.

View bgnori's full-sized avatar

Noriyuki Hosaka bgnori

  • Itabashi, Tokyo, Japan
View GitHub Profile
10:23:28 [INFO] bgnori has summoned hurd of Blaze, Zompig and Ghast!!
10:23:28 [SEVERE] java.lang.IllegalStateException: TickNextTick list out of synch
10:23:28 [SEVERE] at net.minecraft.server.World.a(World.java:2382)
10:23:28 [SEVERE] at net.minecraft.server.World.doTick(World.java:1757)
10:23:28 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:538)
10:23:28 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
10:23:28 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
10:23:28 [SEVERE] Unexpected exception
java.lang.IllegalStateException: TickNextTick list out of synch
at net.minecraft.server.World.a(World.java:2382)
(defn bf [tape mem ptr skip]
(let [[c & tape] tape
]
(case c
">" (recur tape mem (inc ptr) skip)
"<" (recur tape mem (dec ptr) skip)
"+" (recur tape (assoc mem ptr (inc (mem ptr))) ptr skip)
"-" (recur tape (assoc mem ptr (dec (mem ptr))) ptr skip)
(def tape-hw (seq
"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>."
))
(def tape-ano
(seq
(str
"+++[>+++++<-]>[>+>+++>+>++>+++++>++<[++<]>---]>->-.[>++>+<<--]>--.--.+.>>>++.<<"
"<------.+.+++++.>>-.<++++.<--.>>>.<<---.<.-->-.>+.[+++++.---<]>>[.--->]<<.<+.+"
"+.++>+++[.<][.]<++."
import sys
STDOUT = sys.stdout
"""http://en.wikipedia.org/wiki/Unlambda"""
import sys
STDOUT = sys.stdout
"""http://en.wikipedia.org/wiki/Unlambda"""
class UnlambdaObject:
(defn block-categoly
;FIXME, stupid implementation.
;available options:
; :vacant :enterable :combustible
;usage:
; (block-categoly :vacant :enterable) => #{} of vacant and enterable
; (block-categoly :enterable :vacant) => #{} of vacant and enterable
;
[&keys]
(let [c (set keys)
@bgnori
bgnori / aojprepare.py
Created May 17, 2012 01:37
aojのsample inputとoutputをローカルのファイルに保存する。
#!/usr/bin/python
# -*- coding=utf8 -*-
import sys
import codecs
from urlparse import urlunparse
from urllib import urlencode, urlopen
from lxml import etree
#include<stdio.h>
#include<time.h>
#define N (10*1000*1000)
int table[N+1];
int uncheck_min = 0;
int calc(int x){
int i;
#include <stdio.h>
#define DEBUG 0
typedef struct TGrid Grid;
struct TGrid {
int fRight;
int fDown;
};
@bgnori
bgnori / 0041.c
Created May 22, 2012 18:00
AOJ 0041
/* AOJ 0041
*
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0041
*
*/
#include <stdio.h>
#include <assert.h>