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
#!/usr/bin/env ruby | |
# encoding : utf-8 | |
# 使い方 | |
# $ ./deps.rb > deps.dot | |
# Graphvizで出力 | |
# $ dot -Tpng deps.dot -o deps.png | |
# deps.pngを開く | |
# 図の見方として |
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
#!/usr/local/bin/gosh | |
(define (main args) | |
(print (map fizzbuzz (iota 2014 1))) | |
0 ) | |
(define (dividable x y) | |
(zero? (mod x y))) | |
(define (fizzbuzz x) | |
(cond |
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
#!/usr/bin/env ruby | |
# encoding : utf-8 | |
# Timeの現在時刻のUNIXタイムから、まず0と1を作る | |
time = Time.now.to_i | |
zero = time | |
one = time | |
if time.zero? | |
# zero = time |
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
#!/usr/bin/env ruby | |
# encoding : utf-8 | |
# Complexクラスは1.9.xでは組み込みクラスになった | |
# require 'complex' | |
include Math | |
ONE_ARG_FUNCS = %w(sin cos tan asin acos atan sinh cosh tanh asinh acosh atanh exp log log10 log2 sqrt) | |
stack = [] |
NewerOlder