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
| require 'fiber' | |
| f1 = nil | |
| f2 = nil | |
| f1 = Fiber.new do | |
| puts 'f1-0' | |
| f2.resume | |
| puts 'f1-1' | |
| f2.resume |
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
| # vim:set fileencoding=utf-8 | |
| # | |
| # this script is for Ruby 1.9.1 | |
| # | |
| def count(start = 0) | |
| n = start | |
| Fiber.new do | |
| loop do | |
| Fiber.yield n |
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
| use strict; | |
| use warnings; | |
| package Count; | |
| sub new { | |
| my $class = shift; | |
| my $start = shift || 0; | |
| bless { count => $start }, $class; |
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
| hahaha |
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
| fufufu |
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 perl | |
| use strict; | |
| use warnings; | |
| use XML::Feed; | |
| use URI; | |
| my $DEBUG = 1; | |
| sub info { print STDERR @_, "\n";} | |
| sub debug { warn @_ if $DEBUG; } |
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
| use strict; | |
| use warnings; | |
| use Coro::State; | |
| use Perl6::Say; | |
| sub count { | |
| my ($start) = @_; | |
| my $n = $start; | |
| my $p = Coro::State->new; | |
| my $c; |
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
| use strict; | |
| use warnings; | |
| use Coro::Generator; | |
| use Perl6::Say; | |
| sub count { | |
| my $start = shift; | |
| generator { | |
| my $n = $start; | |
| while (1) { |
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
| #!/bin/sh | |
| # 新しいリポジトリをつくる | |
| mkdir merge_test | |
| cd merge_test | |
| git init | |
| # puuファイルを作成 | |
| echo 'puu' > puu | |
| git add . |
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
| use strict; | |
| use warnings; | |
| use YAML; | |
| use Perl6::Say; | |
| use XML::Feed; | |
| use URI; | |
| BEGIN { | |
| eval { require XML::Feed::RSS }; | |
| eval { require XML::Feed::Format::RSS }; |