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 perl | |
use strict; | |
use warnings; | |
use utf8; | |
use IO::Handle; | |
use Time::HiRes qw(sleep); | |
for my $i (1 .. 100) { | |
sleep 0.02; |
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 perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Getopt::Long; | |
use Perl6::Say; | |
use Pod::Usage; | |
use DateTime; | |
use Digest::SHA1 qw( sha1 ); |
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
use strict; | |
use warnings; | |
local $\ = "\n"; | |
1->[0] = 100; | |
print 1->[0]; # => 100 | |
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
use strict; | |
use warnings; | |
use utf8; | |
use Perl6::Say; | |
use String::CamelCase qw(camelize); | |
say "--- cat ---"; |
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
object Main { | |
def main(args:Array[String]) = { | |
val DEFAULT = 100 | |
val end:Int = { | |
if (args.isEmpty) | |
DEFAULT | |
else | |
try { |
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
// Threadとどう違うのよ | |
class Human(no:Int) extends scala.actors.Actor { | |
def act() = println(no + "人目 誕生") | |
} | |
object Main { | |
def main(args:Array[String]) = { | |
// 子孫繁栄 | |
(1 to 6).foreach(no => { |
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
import scala.testing.Benchmark | |
import java.util.Timer | |
class For(MAX_LOOP:Int) { | |
var sum:Int = 0 | |
def run() = { | |
println("iterate " + MAX_LOOP + " times...") | |
val start:Long = System.currentTimeMillis() |
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
#include <iostream> | |
#include <string> | |
#include <cstdlib> | |
struct foreach { | |
foreach& | |
operator()(const char* s) { | |
std::cout << s << std::endl; | |
return *this; | |
} |
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 perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use FileHandle; | |
use Getopt::Long; | |
use Pod::Usage; |
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 perl | |
# vim:ft=perl: | |
use strict; | |
use warnings; | |
use utf8; | |
use DateTime; | |
use File::Basename qw(basename); | |
use File::Copy qw(copy); | |
use FileHandle; |