Skip to content

Instantly share code, notes, and snippets.

View tyru's full-sized avatar
🏠
Working from home

Fujiwara Takuya tyru

🏠
Working from home
View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use constant {
MAX_TERM_WIDTH => 42
};
use Win32::Die;
use Win32::Process;
#!/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;
#!/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 );
use strict;
use warnings;
local $\ = "\n";
1->[0] = 100;
print 1->[0]; # => 100
use strict;
use warnings;
use utf8;
use Perl6::Say;
use String::CamelCase qw(camelize);
say "--- cat ---";
object Main {
def main(args:Array[String]) = {
val DEFAULT = 100
val end:Int = {
if (args.isEmpty)
DEFAULT
else
try {
// 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 => {
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()
#include <iostream>
#include <string>
#include <cstdlib>
struct foreach {
foreach&
operator()(const char* s) {
std::cout << s << std::endl;
return *this;
}
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Encode;
use FileHandle;
use Getopt::Long;
use Pod::Usage;