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
| #!/usr/bin/env gosh | |
| ;https://gist.github.com/yamasushi/4e39c4d5cc3016b469aa | |
| (use gauche.lazy) | |
| (use gauche.parseopt) | |
| (define (main args) (let-args (cdr args) | |
| ((nchr "n=i" 140) . files ) | |
| $ list->string |
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
| #!/usr/bin/perl | |
| # https://gist.github.com/yamasushi/20edd22b4b5b1156281f | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| binmode STDIN,":utf8"; | |
| binmode STDOUT,":utf8"; | |
| use List::Util qw(shuffle); | |
| print join '', shuffle(split //, (join '',<>)); |
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
| #!/usr/bin/perl | |
| # https://gist.github.com/yamasushi/311c5c424356abf645a2 | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| binmode STDIN,":utf8"; | |
| binmode STDOUT,":utf8"; | |
| while(<>){ | |
| chomp; |
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
| gosh> (load "./twitterland-examples") | |
| (-< yamasushi <@yamasushi : "まじです"> [@yamasushi : <@yamasushi : "つぶやき,はじめます">]) | |
| (-< null <@shuji : "まじで?"> [@null : <@yamasushi : "つぶやき,はじめます">]) | |
| (-< null <@yamasushi : "つぶやき,はじめます"> [@null : #f]) | |
| (-< shuji <@shuji : "まじで?"> [@shuji : #f]) | |
| (-< yamasushi <@yamasushi : "つぶやき,はじめます"> [@yamasushi : #f]) | |
| (-< null <@yamasushi : "まじです"> [@null : <@shuji : "まじで?">]) | |
| (-> shuji <@yamasushi : "まじです"> [@shuji : <@shuji : "まじで?">]) | |
| (-> yamasushi <@shuji : "まじで?"> [@yamasushi : <@yamasushi : "つぶやき,はじめます">]) |
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
| gosh> (load "./graph-examples") | |
| (:-> "The Magic Flute" "Mozart" "composer")(:-< "Mozart" "The Magic Flute" "compose") | |
| (:-< 私 手鏡 持つ)(:-> 私 手鏡 見る) | |
| (:-> "hogehoge.pdf" "ほげほげについての一考察" Title)(:-> "hogehoge.pdf" "ふむ,ふむん" Author) | |
| (:-> "The Magic Flute" "Mozart" "composer")(:-< "Mozart" "The Magic Flute" "compose") | |
| #t |
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
| (define-method -<? ((i <integer>) (j <integer>)) ($ integer? $ / j i) ) | |
| (define-method >-? ((j <integer>) (i <integer>)) (-<? i j) ) | |
| (define-method ->? ((p <pair>) x ) (eq? x (car p)) ) | |
| (define-method -<? ((p <pair>) x ) (eq? x (cdr p)) ) | |
| (define-method ->! ((p <pair>) x ) (set-car! p x) ) | |
| (define-method -<! ((p <pair>) x ) (set-cdr! p x) ) | |
| (define-method <-? (x (p <pair>) ) (->? p x) ) | |
| (define-method >-? (x (p <pair>) ) (-<? p x) ) |
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
| (define shuji (make-profile 'shuji) ) | |
| (define yamasushi (make-profile 'yamasushi) ) | |
| (define syamamoto (make-profile 'syamamoto) ) | |
| (define shuji-data-0 | |
| ( $ post "3rd(reply/RT it)" | |
| $ post "2nd" | |
| $ post "1st" shuji ) ) |
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
| $ gosh memtest | |
| #?="./memtest.scm":19:(gcstat-used-heap (gc-stat)) | |
| #?- 1191.936 | |
| #?="with-input-from-port" | |
| #?- "with-input-from-port" | |
| #?="./memtest.scm":24:(gcstat-used-heap (gc-stat)) | |
| #?- 26759.168 | |
| $ gosh memtest | |
| #?="./memtest.scm":19:(gcstat-used-heap (gc-stat)) |
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
| $ gosh -fcollect-stats csv/test-csv ken_all.csv | |
| #?="/home/shuji/gauche/csv/test-csv.scm":47:(benchmark reader) | |
| ;(time (read-data rdr (cadr args))) | |
| ; real 8.046 | |
| ; user 7.540 | |
| ; sys 0.250 | |
| #?="/home/shuji/gauche/csv/test-csv.scm":42:(gcstat-used-heap e) | |
| #?- 113049.6 | |
| #?- ((:total-heap-size 124317.69600000001) (:free-bytes 15593.472000000002) (:total-bytes 193734.06399999998)) |
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
| --- /home/shuji/gauche-dev/Gauche/lib/text/csv.scm 2013-06-03 19:24:53.622756718 +0900 | |
| +++ csv.scm 2013-06-05 15:31:30.180567414 +0900 | |
| @@ -31,7 +31,7 @@ | |
| ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| ;;; | |
| -(define-module text.csv | |
| +(define-module csv.csv | |
| (use srfi-1) | |
| (use srfi-11) |