Blog
P2P関連のメモ
6月 9th, 2007
・サービス一覧
[Napster]
P2P技術を用いた音楽を中心とするファイル共有ソフト(ハイブリッドP2P)
[KaZaA]
NapsterクローンのP2Pファイル共有ソフト(スーパーノード型ハイブリッドP2P)
[Gnutella]
P2Pプロトコルおよびファイル共有クライアント(ピュアP2P)
[PeerCast]
P2Pで音楽をストリーム配信/受信
・学術的なプロジェクト
[OceanStore]
カリフォルニア大学バークレー校でエンデバー・プロジェクトのコンポーネントとして、xFSファイルシステムを開発したチームが開発しているP2Pスタイルの分散型ファイルシステムの開発プロジェクト
[HyperBee]
P2Pを用いた分散検索エンジン
ネットワーク形態を大まかに二つに種類わけをすると(引用*1)、
[Unstructuredオーバーレイ]
GnutellaやWinnyネットワークなど、誰を隣接ノードとするか、トポロジー(ネットワーク形態)に制約がない。
一般に効率は良くないが、柔軟な検索が可能。
[Structuredオーバーレイ]
DHT(分散ハッシュ表)ネットワークなど。トポロジーに制約がある。存在するオブジェクトは大体みつかる。
一般に効率はいいが、柔軟な検索が苦手。
・DHTネットワークの色々なアルゴリズム
[Pastry]
FreePastry, Bamboo、両方Javaで実装されている。Plaxtonアルゴリズムを応用。
[Chimera]
TapestryとPastryに似た、次世代オーバーレイらしい。Light Cで実装。
[Coral]
DSHT(distributed sloppy hash table)
[Kademlia]
2分木構造を利用。
[Skipnet]
[Chord]
[CAN]
参照
*1 http://www.shudo.net/publications/SACSIS2006-OW/shudo-SACSIS2006-slides-OverlayWeaver.pdf
チタン削り出しiPod nanoケース
6月 6th, 2007

iPod本人より高いやんwwwwwwwwwwwww
でもこういう技術の無駄遣い、アタシ好きよ(´艸`)
IOCCC(国際邪悪なCコードコンテスト)
6月 3rd, 2007
ちょwwwww
C言語の勉強をしていたら、こんなサイトにたどり着いた。
なんでも、C言語の柔軟性を負の方向に昇華させたコンテストらしい。つまりC言語のアート。
もう、コード自体がアスキーアートになってたりして、全く解読不能。
例えばこれ:
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <GL/glx.h>
#include <GL/glu.h>
#define E(x) { printf("%i\n",x); goto l; }
#define G fgetc(F)
#define H glEnable(
#define I glMaterialfv(GL_FRONT,
#define J glMatrixMode(
#define L (y
#define M 640,480
#define N NULL
#define O GL_DIFFUSE , i
#define P glCallList(u);
#define T glTexCoord2i
#define U glLightfv(GL_LIGHT0,
#define V R(); glVertex3i(c,m,n);
#define X GL_TEXTURE_2D
#define Z(x) G; x=G; x=x<50-(x==59);
void Y()
{ { { { { { { { { { { { { { { {
{ { { { { { { { { { {
{ { { { { {
{ { { { { { { {
{ { { { { {
{ { { { { ; { } } } } }
} } } } } } }
} } } } } }
} } } } } }
} } } } } }
} } } } } } }
} } } } } } } } } } } } } } } }
void Q()
{ { ; { { { { { { { {
{ { { { { {
{ { { { { {
; { { } } } } } } } }
} ; } } } } } } } } }
} } } } } }
FILE *F; int u,t,l,m,n,x=0,a=0,b[]={ GLX_DOUBLEBUFFER,
GLX_RGBA , GLX_DEPTH_SIZE , 16, None},o,n,c ; void R() {
Z(c); Z(m); Z(n); } int main( int _, char **A) { char f[
BUFSIZ ] ; GLXContext r ; XVisualInfo * v ; Display *y;
XEvent e ; GLfloat g=0, h=10, i[ ]= { 1,1, 1, 1, 5,5, 100
,0, .6, .6, .6 ,1 } ; XSetWindowAttributes s; GLubyte j[1
<<10] ; Window w; if(! L= XOpenDisplay ( N ) ) ) E(1) ;if
( !
glXQueryExtension L , N , N ) ) E (2); v=glXChooseVisual L ,
DefaultScreen (y ) , b ) ; s.colormap = XCreateColormap L ,
RootWindow (y,v -> screen), v -> visual, AllocNone ); if (!(
r= glXCreateContext L, v, N, 1) ) ) E (3) ; strcpy(f, *A ) ;
s.event_mask=KeyPressMask; strcat(f,".c"); F=fopen(f,"r" ) ;
w= XCreateWindow L, RootWindow( y, v -> screen ), M , M, 0,v
->depth,InputOutput, v->visual , CWColormap|CWEventMask, &s)
;glXMakeCurrent L , w , r ); H GL_DEPTH_TEST ); if ( ! F )E(
4 ) ; glShadeModel ( GL_SMOOTH ) ; while ( a != 89 ) a = G ;
G; G ; glGenTextures( 1, & t ); while ( x< 1024 ) { G; a =G;
j[ x++ ] = 128; j[ x++ ] = 128 & - ( a<33 ); j [ x ]= j[ x-1
]; x++; j[x++] =-1;} glBindTexture(X,t); glTexParameteri (X,
GL_TEXTURE_MIN_FILTER , GL_NEAREST ) ; glTexImage2D( X ,0,
GL_RGBA, 16 , 16 , 0 , GL_RGBA, GL_UNSIGNED_BYTE , j ) ; J
GL_PROJECTION ) ; gluPerspective( 60 , 1.333 , 1 , 100) ; J
GL_MODELVIEW); u=glGenLists(1); glNewList(u,GL_COMPILE); H X
) ; while ( a != 81 ) a = G ; G ; G ; for (x=0; x<6; x++ ) {
glBegin(GL_QUADS); R(); glNormal3f( c, m,n); T(1,1); V T (1,
0 ) ; V T ( 0 , 0 ) ; V T( 0 , 1 ) ; V glEnd ( ) ; }
glEndList( ) ; XMapWindow L , w ) ; c = 0; for ( ; ; ) { if(
XPending L ) ) { XNextEvent L , &e ) ; if((XLookupKeysym ( (
XKeyEvent *)&e,0))&1<<5){ h=10; i[c]=!i[c]; c++; c&=3; } else
E(0)} glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
glLoadIdentity(); gluLookAt ( -2 ,0 ,5 ,0,0 ,0,0 ,0 ,1 ) ; H
GL_LIGHTING); H GL_LIGHT0 ); U GL_POSITION, i + 4); U O) ; U
GL_SPECULAR,i); glLightModelfv( GL_LIGHT_MODEL_AMBIENT,i +8)
; I GL_AMBIENT, i+8); I O + 8 ) ; glRotatef( g, 1, 1, 1) ; P
glTranslatef(-h,0,0); P usleep (4000); g+=.07*x; if (g>360)
g-=360.0; h-=x /100.0; glFlush(); glXSwapBuffers L ,w);}
l:
return 0;
}
意味不明wwwwwwww
あとこれはJavaっぽいコードで書けるようにしてる。ちゃんとコンパイルできたし、すごい!!
/*
* Sun's Java is often touted as being "portable", even though my code won't
* suddenly become uber-portable if it's in Java. Truth is, Java's one of
* the most ugly, slow, and straitjacketed languages ever. It's popular
* mainly because people hear the word "portable" and go "ewww".
*
* This program, then, is dedicated to bringing about the death of Java. We
* good coders have been oppressed for too long by the lame language
* decisions of pointy-haired bosses and academics who should know better.
* It's time we stand up against this junk, and bring back the fun in
* programming! Viva La Revolution!
*/
#define aSet c
#define BufferedReader(x)1
#define byte Y[I][_^1]?do(:):_&1?do(.):do(`):8;++y;}
#define class int N=0,_,O=328,l=192,y=4,Y[80][64]={0},I;struct
#define do(c)a(#c "\b")
#define err c,c
#define getAllStrings(x));q()
#define if(x)b(#x)
#define IOException
#define line c
#define main(a)b(char*x){write(1,"\033[",2),null}main()
#define new
#define null a(x);}a(char*x){write(1,x,strlen(x));try;try;try;try;
#define out c,c
#define println(x)c
#define private int d(int
#define public short c;}c;typedef int BufferedReader;char*F="JF>:>FB;;BII";
#define return {return
#define static f(x){N=(N+x)%6,y--?f(0),f(1),f(4),f(1):++Y[(I=O+N[F]-66)
#define String
#define System c
#define this if(D):1,O=I,I/=16,l<_/32?if(B):l>_/32?if(A):2,l=_,_/=16,byte
#define throws
#define toArray(x)c
#define try for(;--c.c;)
#define void /16][(_=l+N[6+F]-66)/16]?O/=16,l/=32,O<I/16?if(C):O>I/16?this
#define while(k)if(2J),if(7;21H),f(0),f(4),f(4),if(H),/*
import java.io.*;
import java.util.*;
/**
* A lame Java program.
* @author J. Random Worker
*/
class LameJavaApp
{
/** The infamous Long-Winded Signature From Hell. */
public static void main(String[] args)
throws IOException
{
/* Don't get me started on this. */
BufferedReader reader =
new BufferedReader(new FileReader(args[0]));
/* What, this long incantation just to print a string? */
System.err.println("Hello world!");
/* At least this is sane. */
String line;
while ((line = reader.readLine()) != null)
System.out.println(line.length());
}
/**
* Method with a needlessly long name.
* @param aSet a set (!)
*/
private String[] getAllStrings(Set<String> aSet)
{
/*
* This dance is needed even in J2SE 5, which has type
* templates. It was worse before that.
*/
return aSet.toArray(new String[0]);
}
}
C言語楽しすぎますね。もといC++勉強がんばろう!

ようこそ、ここは拙作のソフトウェアやWebサービスを気ままに公開するサイトです。