Skip to content

Instantly share code, notes, and snippets.

@gyuque
gyuque / hannya.rb
Created May 13, 2011 14:49
般若心経SHA1
require 'digest/sha1'
HANNYA_CHARS = [
'観','菩','薩','行','深','般','若','波',
'羅','蜜','多','時','照','見','五','蘊',
'皆','空','度','苦','厄','舎','利','阿',
'不','異','即','是','想','心','経','如'
]
def hannya_sha1(src)
s = []
@leegao
leegao / Rationale.md
Created July 9, 2011 02:30
JIT for dummies: JIT compiling RPN in python

If you don't care about the explanation, scroll down to find the code, it's 50 some odd lines and written by someone who doesn't know any better. You have been warned.

What it does

This is a very simple proof of concept jitting RPN calculator implemented in python. Basically, it takes the source code, tokenizes it via whitespace, and asks itself one simple question: am I looking at a number or not?

First, let's talk about the underlying program flow. Pretend that you are a shoe connoisseur with a tiny desk. You may only have two individual shoes on that desk at any one time, but should you ever purchase a new one or get harassed by an unruly shoe salesman without realizing that you have the power to say no (or even maybe?), you can always sweep aside one of the two shoes on the desk (the one on the right, because you're a lefty and you feel that the left side is always superior) onto the messy floor, put the other shoe on the right hand side, and then place your newly acquired shoe in

Raspberry Pi を動く状態にする

description

Raspberry Pi を最低限使える状態にする = ディスプレイはテレビ、ネットワークは有線、キーボードを USB で接続する、SDカードに OS を突っ込む。あと電源用の micro-B USB ケーブル。

discussion

  • テレビへの接続: RCAケーブル or HDMIケーブル 1 本、ある程度の長さがあったほうが置き場所に困らなくて良さそう
  • ネットワークへの接続: 適当な LAN ケーブル 1 本、これも部屋横断できるぐらい長いのがあるとセットアップ時に困らなさそう、セットアップ後は適当な短いのに置き換えたい。
[
{
"word": "Asshole",
"kana": "アスホール",
"meaning": "いやな奴(Ass=お尻、Hole=穴)",
"notice": "「うざい野郎」「ろくでなし」"
},
{
"word": "あばずれ",
"kana": "あばずれ",