assorted-commits Mailing List for Assorted projects (Page 64)
Brought to you by:
yangzhang
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(86) |
Feb
(265) |
Mar
(96) |
Apr
(47) |
May
(136) |
Jun
(28) |
Jul
(57) |
Aug
(42) |
Sep
(20) |
Oct
(67) |
Nov
(37) |
Dec
(34) |
2009 |
Jan
(39) |
Feb
(85) |
Mar
(96) |
Apr
(24) |
May
(82) |
Jun
(13) |
Jul
(10) |
Aug
(8) |
Sep
(2) |
Oct
(20) |
Nov
(31) |
Dec
(17) |
2010 |
Jan
(16) |
Feb
(11) |
Mar
(17) |
Apr
(53) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(6) |
Sep
(11) |
Oct
(4) |
Nov
(17) |
Dec
(17) |
2011 |
Jan
(3) |
Feb
(19) |
Mar
(5) |
Apr
(17) |
May
(3) |
Jun
(4) |
Jul
(14) |
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
(3) |
Dec
(2) |
2012 |
Jan
(3) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
(5) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(9) |
Apr
(5) |
May
|
Jun
(2) |
Jul
(1) |
Aug
(10) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <yan...@us...> - 2008-02-06 16:19:47
|
Revision: 327 http://assorted.svn.sourceforge.net/assorted/?rev=327&view=rev Author: yangzhang Date: 2008-02-06 08:19:42 -0800 (Wed, 06 Feb 2008) Log Message: ----------- fixed the obscene replication Modified Paths: -------------- hash-join/trunk/src/hashjoin.cc Modified: hash-join/trunk/src/hashjoin.cc =================================================================== --- hash-join/trunk/src/hashjoin.cc 2008-02-06 16:01:30 UTC (rev 326) +++ hash-join/trunk/src/hashjoin.cc 2008-02-06 16:19:42 UTC (rev 327) @@ -204,22 +204,23 @@ int main(int argc, char *argv[]) { - if (argc != 3) { - fprintf(stderr, "hashjoin <ncpus> <actresses>\n"); + if (argc != 4) { + fprintf(stderr, "hashjoin <ncpus> <movies> <actresses>\n"); exit(1); } ncpus = atoi(argv[1]); - const char *actresses = argv[2]; + const char *movies = argv[2]; + const char *actresses = argv[3]; timer t("main time: "); cout << "loading movies" << endl; - movdb mdb("../movie-data/movies.dat"); + movdb mdb(movies); // "../movie-data/movies.dat" t.print(); cout << "loading actresses" << endl; - actdb adb(actresses);//"../movie-data/mdactresses.dat"); + actdb adb(actresses); // "../movie-data/mdactresses.dat" t.print(); cout << "hash-partitioning movies into per-core buckets" << endl; @@ -409,6 +410,7 @@ for (unsigned int i = 0; i < ncpus; i++) { heads[i] = bs[i].bufs[0]; } + char tmp[1024]; // Statistics (TODO dynamic allocation) int counter = 0, mincount = INT_MAX; @@ -416,15 +418,20 @@ while (p < end - 999) { char *name = p; p = strchr(p, '\0') + 1; + strcpy(tmp, name); + char *subtmp = tmp + strlen(name) + 1; char *tuple_end = unsafe_strstr(p, "\0\0", end) + 2; while (true) { char *title = p; p = strchr(p, '\0') + 1; + strcpy(subtmp, title); + size_t strl = strlen(subtmp); + // Copy this line into the correct local bucket. //cout << "hashing " << title << endl; unsigned int bbb; - if (-1 != (bbb = push_bucket(heads, bs, title, name, tuple_end - name))) { + if (-1 != (bbb = push_bucket(heads, bs, title, tmp, subtmp + strl + 1 - tmp))) { //size_t bucket_size = max(1000000,buflen / ncpus * 2); //2 * buflen / ncpus; //int bucket_size = max(1000000UL,buflen / ncpus * 3); //cout << "FUCK " << heads[0] - bs[0].buf << " " << bucket_size << " " << heads[1] - bs[1].buf << " " << p - title << endl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-06 16:01:33
|
Revision: 326 http://assorted.svn.sourceforge.net/assorted/?rev=326&view=rev Author: yangzhang Date: 2008-02-06 08:01:30 -0800 (Wed, 06 Feb 2008) Log Message: ----------- things seem to be working ; performed first experiments on this version (on caneland) Modified Paths: -------------- hash-join/trunk/src/Makefile hash-join/trunk/src/hashjoin.cc Added Paths: ----------- hash-join/trunk/src/method_thread1.h Modified: hash-join/trunk/src/Makefile =================================================================== --- hash-join/trunk/src/Makefile 2008-02-06 08:41:56 UTC (rev 325) +++ hash-join/trunk/src/Makefile 2008-02-06 16:01:30 UTC (rev 326) @@ -1,7 +1,7 @@ all: hashjoin hashjoin: hashjoin.cc - g++ -g3 -Wall -o hashjoin hashjoin.cc -lprofiler + g++ -g3 -Wall -o hashjoin hashjoin.cc -lprofiler -lpthread clean: rm -f hashjoin Modified: hash-join/trunk/src/hashjoin.cc =================================================================== --- hash-join/trunk/src/hashjoin.cc 2008-02-06 08:41:56 UTC (rev 325) +++ hash-join/trunk/src/hashjoin.cc 2008-02-06 16:01:30 UTC (rev 326) @@ -13,6 +13,8 @@ #include <pthread.h> +#include "method_thread1.h" + // // c++ commons :: numa // TODO document @@ -61,13 +63,15 @@ class timer { public: - timer() : start(current_time_millis()), last(start) {} + timer(const string label) : + label(label), start(current_time_millis()), last(start) {} void print() { long long now = current_time_millis(); - cout << now - last << endl; + cout << label << now - last << endl; last = now; } private: + const string label; long long start, last; }; @@ -130,29 +134,46 @@ }; // TODO dependency injection -const unsigned int ncpus = 2; +unsigned int ncpus = 1; typedef hash_map<const char *, const void *, hash<const char *>, eqstr> hmap; -const hmap::size_type map_size = 1000000; +const hmap::size_type map_size = 10000000; +class bucket { +public: + vector<size_t> sz; + vector<char *> bufs; +}; + class db { public: db(const char *path) { load_file(path, buf, buflen, ncpus); } + const bucket **partition(); + virtual void partition1(unsigned int pid, bucket* bucket) = 0; + virtual ~db() {} + unsigned int push_bucket(char **heads, bucket *bs, const char *s, const char + *p, size_t nbytes); protected: // TODO smart pointer char *buf; size_t buflen; }; -class movdb : db { +class movdb : public db { public: movdb(const char *path) : db(path) {} - void build(hmap &h); + virtual ~movdb() {} + const hmap *build(const bucket **movbucs); + void build1(unsigned int pid, const bucket **movbucs, hmap *h); + void partition1(unsigned int pid, bucket* bucket); }; -class actdb : db { +class actdb : public db { public: actdb(const char *path) : db(path) {} - void probe(const hmap &h, bool show_progress); + virtual ~actdb() {} + void probe(const hmap *hs, const bucket **actbucs, bool show_progress); + void probe1(unsigned int pid, const hmap *hh, const bucket **actbucs); + void partition1(unsigned int pid, bucket* bucket); }; // template <typename T> @@ -183,107 +204,338 @@ int main(int argc, char *argv[]) { - timer t; + if (argc != 3) { + fprintf(stderr, "hashjoin <ncpus> <actresses>\n"); + exit(1); + } + ncpus = atoi(argv[1]); + const char *actresses = argv[2]; + + timer t("main time: "); + cout << "loading movies" << endl; - movdb movdb("../movie-data/movies.list"); + movdb mdb("../movie-data/movies.dat"); t.print(); cout << "loading actresses" << endl; - actdb actdb("../movie-data/actresses.list"); + actdb adb(actresses);//"../movie-data/mdactresses.dat"); t.print(); - hmap h(map_size); + cout << "hash-partitioning movies into per-core buckets" << endl; + const bucket **movbucs = mdb.partition(); + t.print(); + cout << "hash-partitioning actresses into per-core buckets" << endl; + const bucket **actbucs = adb.partition(); + t.print(); + cout << "building with movies" << endl; - movdb.build(h); + const hmap *hs = mdb.build(movbucs); t.print(); cout << "probing with actresses" << endl; - actdb.probe(h, true); + adb.probe(hs, actbucs, true); t.print(); cout << "done" << endl; } -void -movdb::build(hmap &h) +const bucket ** +db::partition() { - char *p = buf, *end = buf + buflen; - // Skip 20 lines. - p = strchrrep(p, '\n', 20); - while (p < end) { - // Search for end of title and null-terminate it. - char *title = strsep(&p, "\t"); - if (p == NULL) { - // The last line is ----------- so ignore it. - break; + // Create the buckets. + bucket **buckets = new bucket*[ncpus]; + for (unsigned int i = 0; i < ncpus; i++) { + buckets[i] = new bucket[ncpus]; + for (unsigned int j = 0; j < ncpus; j++) { + int bucket_size = max(1000000UL,buflen / ncpus * 3); + // Each bucket should be twice as large as it would be given uniform + // distribution. This is just an initial size; extending can happen. + buckets[i][j].bufs.push_back(new char[bucket_size]); + buckets[i][j].sz.push_back(0); + check(buckets[i][j].bufs[0]); } - // Search for start of release date. - char *release = p + strcspn(p, "\t"); - // Insert into hash map. - h[title] = release; - // Search for next line. - char *newline = strchr(release, '\n'); - check(newline != NULL); - p = newline + 1; } + + // Partition the data into the buckets using the hash function. Reason for + // buckets: poor man's message passing. All the data from CPU i to CPU j goes + // into bucket[i][j]. + pthread_t ts[ncpus]; + for (unsigned int i = 0; i < ncpus; i++) { + ts[i] = method_thread1(this, &db::partition1, i, buckets[i]); + } + for (unsigned int i = 0; i < ncpus; i++) { + void *value; + check(pthread_join(ts[i], &value) == 0); + } + + // // Now from the consumer + // for (int i = 0; i < ncpus; i++) { + // ts[i] = method_thread1( + // // XXX + // ); + // } + return const_cast<const bucket**>(buckets); // TODO why is this cast needed? } -void -join(const char *movie, const char *actress) +// XXX +//inline const char * +//unsafe_strstr(const char *p, const char *q, const char *lim) +//{ +// while (true) { +// if (lim > 0 && p >= lim) return NULL; +// p = strchr(p, '\0') + 1; +// if (lim > 0 && p >= lim) return NULL; +// if (*p == '\0') return p; +// } +//} + +inline char * +unsafe_strstr(char *p, char *q, char *lim) { - // cout << "JOINED: " << movie << " WITH " << actress << endl; + if (lim == 0) { + while (true) { + for (; !(*p == '\0' && *(p+1) == '\0'); p++); + return p; + } + } else { + while (true) { + for (; !(*p == '\0' && *(p+1) == '\0') && p < lim; p++); + if (p == lim) return NULL; + return p; + } + } } +// inline char * +// unsafe_strstr(char *p, char *q, char *lim) +// { +// return const_cast<char *>(unsafe_strstr(const_cast<const char*>(p), +// const_cast<const char*>(q), +// const_cast<const char*>(lim))); +// } + +inline char * +next_tuple(char *p) +{ + char *next = unsafe_strstr(p, "\0\0", 0); + return next == NULL ? p + strlen(p) : next + 2; +} + +/** + * \param s The string to hash. + * \param p The start of the tuple. + * \param nbytes The length of the tuple. + */ +unsigned int +db::push_bucket(char **heads, bucket *bs, const char *s, const char *p, size_t nbytes) +{ + size_t h = __stl_hash_string(s); + unsigned int bucket = h % (map_size * ncpus) / map_size; + //cout << s << " : " << bucket << endl; + //size_t bucket_size = max(1000000,buflen / ncpus * 2); //2 * buflen / ncpus; + int bucket_size = max(1000000UL,buflen / ncpus * 3); + if (heads[bucket] + nbytes < bs[bucket].bufs.back() + bucket_size) { + memcpy(heads[bucket], s, nbytes); + heads[bucket] += nbytes; + return -1; + } else { + //cout << s << endl; + // cout << (uintptr_t)heads[bucket] << " " << nbytes << " " << (uintptr_t)bs[bucket].buf << " " << bucket_size << endl; + bs[bucket].sz.back() = heads[bucket] - bs[bucket].bufs.back(); + bs[bucket].bufs.push_back(new char[bucket_size]); + check(bs[bucket].bufs.back()); + heads[bucket] = bs[bucket].bufs.back(); + return bucket; + } +} + void -actdb::probe(const hmap &h, bool show_progress) +movdb::partition1(unsigned int pid, bucket *bs) { - char *p = buf, *end = buf + buflen; - p = strchrrep(p, '\n', 240); - int counter = 0, hits = 0, misses = 0; + // Calculate where our initial partition starts and ends (approximately -- if + // we land in the middle of a tuple, we will advance to the next one first). + char *partstart = pid == 0 ? buf : next_tuple(buf + buflen * pid / ncpus), + *partend = pid == ncpus - 1 ? + buf + buflen - 1 : + next_tuple(buf + buflen * (pid + 1) / ncpus); + cout << "cpu " << pid << " partition " << + partstart - buf << ".." << partend - buf << endl; + // Position the writing heads at the head of each bucket. (TODO find better + // name than head) + char *heads[ncpus]; + for (unsigned int i = 0; i < ncpus; i++) { + heads[i] = bs[i].bufs[0]; + } + // Statistics (TODO dynamic allocation) + int counter = 0, mincount = INT_MAX; + char *p = partstart, *end = partend; while (p < end) { + // cout << "remaining: " << end - p << " " << (uintptr_t) p << " ; " << ((int) *(p-1)) << " ; " << ((int) *(p)) << " ; " << ((int) *(p+1)) << endl; + char *title = p; + char *release = strchr(p, '\0') + 1; + p = strchr(release, '\0') + 2; + // Copy this line into the correct local bucket. + if (-1 != push_bucket(heads, bs, title, title, p - title)) { + //cout << "FUCK " << heads[0] - bs[0].buf << " " << heads[1] - bs[1].buf << " " << p - title << endl; + //mincount = min(mincount, counter); + //if (mincount == counter) cout << "CRAP" << counter << endl; + //cout << "overflowed on: " << title << endl; + } counter++; - // Search for end of name and null-terminate it. - char *name = strsep(&p, "\t"); - if (p == NULL) { - // The last line is ------------ so ignore it. - break; - } - if (show_progress && counter % 100000 == 0) { - cout << hits << " " << misses << " " << name << endl; - } + } + // Record the written size of each bucket. + for (unsigned int i = 0; i < ncpus; i++) { + bs[i].sz.back() = heads[i] - bs[i].bufs.back(); + } + cout << "movie count " << counter << " vs " << bs[0].sz.back()<< endl; +} + +void +actdb::partition1(unsigned int pid, bucket *bs) +{ + // Calculate where our initial partition starts and ends (approximately -- if + // we land in the middle of a tuple, we will advance to the next one first). + char *partstart = pid == 0 ? buf : next_tuple(buf + buflen * pid / ncpus), + *partend = pid == ncpus - 1 ? + buf + buflen - 1 : + next_tuple(buf + buflen * (pid + 1) / ncpus); + cout << pid << " part " << partstart - buf << " " << partend - buf << endl; + + // Position the writing heads at the head of each bucket. (TODO find better + // name than head) + char *heads[ncpus]; + for (unsigned int i = 0; i < ncpus; i++) { + heads[i] = bs[i].bufs[0]; + } + + // Statistics (TODO dynamic allocation) + int counter = 0, mincount = INT_MAX; + char *p = partstart, *end = partend; + while (p < end - 999) { + char *name = p; + p = strchr(p, '\0') + 1; + char *tuple_end = unsafe_strstr(p, "\0\0", end) + 2; while (true) { - // Search for start of movie title. - char *title = p + strspn(p, "\t"); - // Search for end of movie title and null-terminate it. - char *title_end1 = strstr(title, " "); - char *title_end2 = strchr(title, '\n'); - check(title_end2); - char *title_end = title_end1 != NULL && title_end1 < title_end2 ? title_end1 : title_end2; - *title_end = '\0'; - p = title_end + 2; - // Emit any joined tuple. - hmap::const_iterator i = h.find(title); - if (i != h.end()) { - hits++; - join(i->first, name); - } else { - misses++; + char *title = p; + p = strchr(p, '\0') + 1; + + // Copy this line into the correct local bucket. + //cout << "hashing " << title << endl; + unsigned int bbb; + if (-1 != (bbb = push_bucket(heads, bs, title, name, tuple_end - name))) { + //size_t bucket_size = max(1000000,buflen / ncpus * 2); //2 * buflen / ncpus; + //int bucket_size = max(1000000UL,buflen / ncpus * 3); + //cout << "FUCK " << heads[0] - bs[0].buf << " " << bucket_size << " " << heads[1] - bs[1].buf << " " << p - title << endl; + ////mincount = min(mincount, counter); + ////if (mincount == counter) cout << "CRAP" << counter << endl; + //cout << "overflowed " << bbb << " on: " << name << endl; } - // Search for next line. - char *newline = strchr(p, '\n'); - check(newline); - p = newline + 1; - // Two consecutive newlines means new actress. - if (*p == '\n') { + counter++; + + // End of tuple? + if (*p == '\0') { p++; break; - } else { - check(*p == '\t'); } } } + + // Record the written size of each bucket. + for (unsigned int i = 0; i < ncpus; i++) { + bs[i].sz.back() = heads[i] - bs[i].bufs.back(); + } + cout << "actress count " << counter << " vs " << bs[0].sz.back()<< endl; } +const hmap * +movdb::build(const bucket **movbucs) +{ + pthread_t ts[ncpus]; + hmap *hs = new hmap[ncpus]; + for (unsigned int i = 0; i < ncpus; i++) { + ts[i] = method_thread1(this, &movdb::build1, i, movbucs, &hs[i]); + } + for (unsigned int i = 0; i < ncpus; i++) { + void *value; + check(pthread_join(ts[i], &value) == 0); + } + return hs; +} + +void +movdb::build1(unsigned int pid, const bucket **movbucs, hmap *hh) +{ + hmap &h = *hh; + // Visit each bucket that's destined to us (visit each source). + for (unsigned int i = 0; i < ncpus; i++) { + char *p = movbucs[i][pid].bufs[0], + *end = movbucs[i][pid].bufs[0] + movbucs[i][pid].sz[0]; + while (p < end) { + char *title = p; + char *release = strchr(p, '\0') + 1; + p = strchr(release, '\0') + 2; + // Insert into hash map. + h[title] = release; + } + //cout << "cpu " << pid << " src " << i << " cumulative h.size " << h.size() + //<< endl; + } +} + +void +join(const char *movie, const char *actress) +{ + // cout << "JOINED: " << movie << " WITH " << actress << endl; +} + +void +actdb::probe(const hmap *hs, const bucket **actbucs, bool show_progress) +{ + pthread_t ts[ncpus]; + for (unsigned int i = 0; i < ncpus; i++) { + ts[i] = method_thread1(this, &actdb::probe1, i, hs, actbucs); + } + for (unsigned int i = 0; i < ncpus; i++) { + void *value; + check(pthread_join(ts[i], &value) == 0); + } +} + +void +actdb::probe1(unsigned int pid, const hmap *hh, const bucket **actbucs) +{ + const hmap &h = *hh; + for (unsigned int i = 0; i < ncpus; i++) { + char *p = actbucs[i][pid].bufs[0], + *end = actbucs[i][pid].bufs[0] + actbucs[i][pid].sz[0]; + int hits = 0, misses = 0; + while (p < end) { + char *name = p; + p = strchr(p, '\0') + 1; + while (true) { + char *title = p; + p = strchr(p, '\0') + 1; + // cout << "name " << name << "title: " << title << p - title << endl; + // Emit any joined tuple. + if (h.find(title) != h.end()) { + //cout << " HIT" << endl; + hits++; + join(title, name); + } else { + misses++; + } + // End of tuple? + if (*p == '\0') { + p++; + break; + } + } + } + //cout << "cpu " << pid << " src " << i << " hits " << hits << " misses " << + //misses << endl; + } +} + // vim:et:sw=2:ts=2 Added: hash-join/trunk/src/method_thread1.h =================================================================== --- hash-join/trunk/src/method_thread1.h (rev 0) +++ hash-join/trunk/src/method_thread1.h 2008-02-06 16:01:30 UTC (rev 326) @@ -0,0 +1,132 @@ +#ifndef method_thread_h +#define method_thread_h + +#include <assert.h> +#include <pthread.h> + +// non-rpc-specific utility to start a thread that runs +// an object method. returns a pthread_t on success, and +// zero on error. +template <class C> pthread_t +method_thread1(C *o, void (C::*m)()) +{ + class XXX { + public: + C *o; + void (C::*m)(); + static void *yyy(void *vvv) { + XXX *x = (XXX*)vvv; + C *o = x->o; + void (C::*m)() = x->m; + delete x; + (o->*m)(); + return 0; + } + }; + XXX *x = new XXX; + x->o = o; + x->m = m; + pthread_t th; + if(pthread_create(&th, NULL, &XXX::yyy, (void *) x) == 0){ + return th; + } + return 0; +} + +template <class C, class A> pthread_t +method_thread1(C *o, void (C::*m)(A), A a) +{ + class XXX { + public: + C *o; + void (C::*m)(A a); + A a; + static void *yyy(void *vvv) { + XXX *x = (XXX*)vvv; + C *o = x->o; + void (C::*m)(A ) = x->m; + A a = x->a; + delete x; + (o->*m)(a); + return 0; + } + }; + XXX *x = new XXX; + x->o = o; + x->m = m; + x->a = a; + pthread_t th; + if(pthread_create(&th, NULL, &XXX::yyy, (void *) x) == 0){ + return th; + } + return 0; +} + +template <class C, class A1, class A2> pthread_t +method_thread1(C *o, void (C::*m)(A1 , A2 ), A1 a1, A2 a2) +{ + class XXX { + public: + C *o; + void (C::*m)(A1 a1, A2 a2); + A1 a1; + A2 a2; + static void *yyy(void *vvv) { + XXX *x = (XXX*)vvv; + C *o = x->o; + void (C::*m)(A1 , A2 ) = x->m; + A1 a1 = x->a1; + A2 a2 = x->a2; + delete x; + (o->*m)(a1, a2); + return 0; + } + }; + XXX *x = new XXX; + x->o = o; + x->m = m; + x->a1 = a1; + x->a2 = a2; + pthread_t th; + if(pthread_create(&th, NULL, &XXX::yyy, (void *) x) == 0){ + return th; + } + return 0; +} + +template <class C, class A1, class A2, class A3> pthread_t +method_thread1(C *o, void (C::*m)(A1 , A2, A3), A1 a1, A2 a2, A3 a3) +{ + class XXX { + public: + C *o; + void (C::*m)(A1 a1, A2 a2, A3 a3); + A1 a1; + A2 a2; + A3 a3; + static void *yyy(void *vvv) { + XXX *x = (XXX*)vvv; + C *o = x->o; + void (C::*m)(A1, A2, A3) = x->m; + A1 a1 = x->a1; + A2 a2 = x->a2; + A3 a3 = x->a3; + delete x; + (o->*m)(a1, a2, a3); + return 0; + } + }; + XXX *x = new XXX; + x->o = o; + x->m = m; + x->a1 = a1; + x->a2 = a2; + x->a3 = a3; + pthread_t th; + if(pthread_create(&th, NULL, &XXX::yyy, (void *) x) == 0){ + return th; + } + return 0; +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-06 08:41:50
|
Revision: 325 http://assorted.svn.sourceforge.net/assorted/?rev=325&view=rev Author: yangzhang Date: 2008-02-06 00:41:56 -0800 (Wed, 06 Feb 2008) Log Message: ----------- added hash join Added Paths: ----------- hash-join/ hash-join/trunk/ hash-join/trunk/src/ hash-join/trunk/src/Makefile hash-join/trunk/src/hashjoin.cc Added: hash-join/trunk/src/Makefile =================================================================== --- hash-join/trunk/src/Makefile (rev 0) +++ hash-join/trunk/src/Makefile 2008-02-06 08:41:56 UTC (rev 325) @@ -0,0 +1,9 @@ +all: hashjoin + +hashjoin: hashjoin.cc + g++ -g3 -Wall -o hashjoin hashjoin.cc -lprofiler + +clean: + rm -f hashjoin + +.PHONY: clean Added: hash-join/trunk/src/hashjoin.cc =================================================================== --- hash-join/trunk/src/hashjoin.cc (rev 0) +++ hash-join/trunk/src/hashjoin.cc 2008-02-06 08:41:56 UTC (rev 325) @@ -0,0 +1,289 @@ +#include <cassert> +#include <cstdio> +#include <iostream> +#include <exception> +#include <vector> + +#include <ext/hash_map> + +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <fcntl.h> + +#include <pthread.h> + +// +// c++ commons :: numa +// TODO document +// + +using namespace std; + +// TODO replace with a macro +inline void +check(bool cond) +{ + if (!cond) { + throw exception(); + } +} + +inline const char * +strchrrep(const char *p, char c, int n) +{ + for (int i = 0; i < n; i++) { + p = strchr(p, c); + check(p); + p++; + } + return p; +} + +inline char * +strchrrep(char *p, char c, int n) +{ + return const_cast<char *>(strchrrep(const_cast<const char *>(p), c, n)); +} + +inline long long current_time_millis() { + long long t; + struct timeval tv; + + gettimeofday(&tv, 0); + + t = tv.tv_sec; + t = (t *1000) + (tv.tv_usec/1000); + + return t; +} + +class timer +{ +public: + timer() : start(current_time_millis()), last(start) {} + void print() { + long long now = current_time_millis(); + cout << now - last << endl; + last = now; + } +private: + long long start, last; +}; + +void +load_file(const char *path, char *&buf, size_t & len, unsigned int ncpus) { + struct stat sb; + // pthread_t tha[CPUS]; + // void *value; + int fd; + + fd = open(path, 0); + check(fd >= 0); + + check(fstat(fd, &sb) == 0); + check(sb.st_size <= 0xffffffff); + + // TODO why don't i need (static) cast here? + len = sb.st_size; + + buf = new char[len + 1]; + check(buf); + + // XXX use threads to pull data to the correct initial locations? +// #if CPUS > 1 + size_t chunk_len = len / ncpus; + for (unsigned int i = 0; i < ncpus; i++) { + // TODO review C++ cast rules + int off = i *chunk_len; + ssize_t status = pread(fd, buf + off, chunk_len, off); + // we read the whole chunk or hit the end + size_t nread = static_cast<ssize_t>(status); + check(status != -1 && (nread == chunk_len || off + nread == len)); +// tha[i] = method_thread1(this, &MapReduce::readin1, i *chunk_len, chunk_len); + } + +// for(i = 0; i < ncpus; i++) +// check(pthread_join(tha[i], &value) == 0); +// #else +// readin1(0, len); +// #endif + + check(close(fd) == 0); + + buf[len] = '\0'; // don't let strcmp() run off the end +} + +// +// hashjoin +// + +using namespace std; +using namespace __gnu_cxx; + +struct eqstr +{ + bool operator()(const char* s1, const char* s2) const + { + return strcmp(s1, s2) == 0; + } +}; + +// TODO dependency injection +const unsigned int ncpus = 2; +typedef hash_map<const char *, const void *, hash<const char *>, eqstr> hmap; +const hmap::size_type map_size = 1000000; + +class db { +public: + db(const char *path) { load_file(path, buf, buflen, ncpus); } +protected: + // TODO smart pointer + char *buf; + size_t buflen; +}; + +class movdb : db { +public: + movdb(const char *path) : db(path) {} + void build(hmap &h); +}; + +class actdb : db { +public: + actdb(const char *path) : db(path) {} + void probe(const hmap &h, bool show_progress); +}; + +// template <typename T> +// class bucket { +// public: +// bucket(int count) { +// ts = new (T*)[count]; +// } +// private: +// T *ts; +// } +// +// typedef vector<const char *> bucket; +// +// class hmap { +// public: +// hmap(int nbuckets) : nbuckets(nbuckets), nentries(0) { +// buckets = new bucket[nbuckets]; +// check(buckets); +// } +// hmap() : nbuckets(nbuckets_default); +// private: +// bucket *buckets; +// int nbuckets; +// int nentries; +// }; + +int +main(int argc, char *argv[]) +{ + timer t; + + cout << "loading movies" << endl; + movdb movdb("../movie-data/movies.list"); + t.print(); + + cout << "loading actresses" << endl; + actdb actdb("../movie-data/actresses.list"); + t.print(); + + hmap h(map_size); + + cout << "building with movies" << endl; + movdb.build(h); + t.print(); + + cout << "probing with actresses" << endl; + actdb.probe(h, true); + t.print(); + + cout << "done" << endl; +} + +void +movdb::build(hmap &h) +{ + char *p = buf, *end = buf + buflen; + // Skip 20 lines. + p = strchrrep(p, '\n', 20); + while (p < end) { + // Search for end of title and null-terminate it. + char *title = strsep(&p, "\t"); + if (p == NULL) { + // The last line is ----------- so ignore it. + break; + } + // Search for start of release date. + char *release = p + strcspn(p, "\t"); + // Insert into hash map. + h[title] = release; + // Search for next line. + char *newline = strchr(release, '\n'); + check(newline != NULL); + p = newline + 1; + } +} + +void +join(const char *movie, const char *actress) +{ + // cout << "JOINED: " << movie << " WITH " << actress << endl; +} + +void +actdb::probe(const hmap &h, bool show_progress) +{ + char *p = buf, *end = buf + buflen; + p = strchrrep(p, '\n', 240); + int counter = 0, hits = 0, misses = 0; + while (p < end) { + counter++; + // Search for end of name and null-terminate it. + char *name = strsep(&p, "\t"); + if (p == NULL) { + // The last line is ------------ so ignore it. + break; + } + if (show_progress && counter % 100000 == 0) { + cout << hits << " " << misses << " " << name << endl; + } + while (true) { + // Search for start of movie title. + char *title = p + strspn(p, "\t"); + // Search for end of movie title and null-terminate it. + char *title_end1 = strstr(title, " "); + char *title_end2 = strchr(title, '\n'); + check(title_end2); + char *title_end = title_end1 != NULL && title_end1 < title_end2 ? title_end1 : title_end2; + *title_end = '\0'; + p = title_end + 2; + // Emit any joined tuple. + hmap::const_iterator i = h.find(title); + if (i != h.end()) { + hits++; + join(i->first, name); + } else { + misses++; + } + // Search for next line. + char *newline = strchr(p, '\n'); + check(newline); + p = newline + 1; + // Two consecutive newlines means new actress. + if (*p == '\n') { + p++; + break; + } else { + check(*p == '\t'); + } + } + } +} + +// vim:et:sw=2:ts=2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-06 04:34:11
|
Revision: 324 http://assorted.svn.sourceforge.net/assorted/?rev=324&view=rev Author: yangzhang Date: 2008-02-05 20:34:16 -0800 (Tue, 05 Feb 2008) Log Message: ----------- added strsep test Modified Paths: -------------- sandbox/trunk/src/c/strings.c Modified: sandbox/trunk/src/c/strings.c =================================================================== --- sandbox/trunk/src/c/strings.c 2008-02-04 19:35:24 UTC (rev 323) +++ sandbox/trunk/src/c/strings.c 2008-02-06 04:34:16 UTC (rev 324) @@ -1,8 +1,31 @@ #include <string.h> +#include <stdio.h> int main() { - char buf[256] = "asdf"; - int i = strncasecmp(buf, "ASDF", 256); - printf("%d\n", i); - return 0; + { + char buf[256] = "asdf"; + int i = strncasecmp(buf, "ASDF", 256); + // Prints 0, meaning that the strings match. + printf("%d\n", i); + } + + { + char buf[256] = "hello hello hello"; + char *p = buf; + // Prints: + // hello + // 6 + // hello + // 12 + // + // 13 + // hello + // 1662417648 + while (p != NULL) { + printf("%s\n", strsep(&p, " ")); + printf("%d\n", p - buf); + } + } + + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 19:35:19
|
Revision: 323 http://assorted.svn.sourceforge.net/assorted/?rev=323&view=rev Author: yangzhang Date: 2008-02-04 11:35:24 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added gps demo Added Paths: ----------- sandbox/trunk/src/cc/gps.cc Added: sandbox/trunk/src/cc/gps.cc =================================================================== --- sandbox/trunk/src/cc/gps.cc (rev 0) +++ sandbox/trunk/src/cc/gps.cc 2008-02-04 19:35:24 UTC (rev 323) @@ -0,0 +1 @@ +link /home/yang/icedb/src/adapters/gps-adapter.cc \ No newline at end of file Property changes on: sandbox/trunk/src/cc/gps.cc ___________________________________________________________________ Name: svn:special + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 19:22:16
|
Revision: 322 http://assorted.svn.sourceforge.net/assorted/?rev=322&view=rev Author: yangzhang Date: 2008-02-04 11:22:18 -0800 (Mon, 04 Feb 2008) Log Message: ----------- initial import of udp-pinger! Added Paths: ----------- udp-pinger/ udp-pinger/trunk/ udp-pinger/trunk/Makefile udp-pinger/trunk/TODO udp-pinger/trunk/src/ udp-pinger/trunk/src/pinger.cc Added: udp-pinger/trunk/Makefile =================================================================== --- udp-pinger/trunk/Makefile (rev 0) +++ udp-pinger/trunk/Makefile 2008-02-04 19:22:18 UTC (rev 322) @@ -0,0 +1,15 @@ +all: pinger + +pinger: tpinger.cc + g++ -pthread -static -static-libgcc -O3 -Wall -pipe -o pinger \ + -Iboost_asio_0_3_8rc3 \ + -I/opt/boost-head-2007.03.25/include \ + -L/opt/boost-head-2007.03.25/lib \ + -lboost_thread-gcc41-mt \ + -lboost_system-gcc41-mt \ + -lboost_serialization-gcc41-mt \ + tpinger.cc \ + -lboost_thread-gcc41-mt \ + -lboost_system-gcc41-mt \ + -lboost_serialization-gcc41-mt + strip pinger Added: udp-pinger/trunk/TODO =================================================================== --- udp-pinger/trunk/TODO (rev 0) +++ udp-pinger/trunk/TODO 2008-02-04 19:22:18 UTC (rev 322) @@ -0,0 +1 @@ +- replace Makefile with autotools Added: udp-pinger/trunk/src/pinger.cc =================================================================== --- udp-pinger/trunk/src/pinger.cc (rev 0) +++ udp-pinger/trunk/src/pinger.cc 2008-02-04 19:22:18 UTC (rev 322) @@ -0,0 +1,249 @@ +// vim:et:sw=2:ts=2 + +#define ntohll(x) (((_int64)(ntohl((int)((x << 32) >> 32))) << 32) | \ + (unsigned int)ntohl(((int)(x >> 32)))) +#define htonll(x) ntohll(x) + +#include <fstream> +#include <iostream> +#include <string> +#include <sstream> +#include <boost/array.hpp> +#include <boost/asio.hpp> +#include <boost/bind.hpp> +#include <boost/thread/thread.hpp> +#include <boost/thread/xtime.hpp> + +#include <sys/time.h> + +#include <boost/archive/binary_iarchive.hpp> +#include <boost/archive/binary_oarchive.hpp> + +int my_nid = -1; +std::string default_port = "55555"; +boost::asio::io_service io_service; + +long long currentTimeMillis() { + using namespace std; + long long t; + struct timeval tv; + + gettimeofday(&tv, 0); + + t = tv.tv_sec; + t = (t *1000) + (tv.tv_usec/1000); + + return t; +} + +using boost::asio::ip::udp; +using namespace boost; + +int sender(std::vector<udp::endpoint> endpoints) +{ + using namespace std; + + try + { + udp::socket socket(io_service); + socket.open(udp::v4()); + + boost::xtime xt; + boost::xtime_get(&xt, boost::TIME_UTC); + for (int seqno = 0; true; seqno++) { + xt.sec += 10; + boost::thread::sleep(xt); + + using namespace std; + using namespace boost::archive; + + for (size_t i = 0; i < endpoints.size(); i++) { + int dst = i + 1; + ostringstream ss; + binary_oarchive oa(ss); + long long time = currentTimeMillis(); + oa & my_nid & dst & seqno & time; + string s = ss.str(); + vector<char> v(s.begin(), s.end()); + // cout << "serialized buffer of size " << s.size() << endl; + socket.send_to(boost::asio::buffer(v), endpoints[i]); + } + } + +// boost::array<char, 128> recv_buf; +// udp::endpoint sender_endpoint; +// size_t len = socket.receive_from( +// boost::asio::buffer(recv_buf), sender_endpoint); +// +// std::cout.write(recv_buf.data(), len); + } + catch (std::exception& e) + { + std::cerr << e.what() << std::endl; + } + + return 0; +} + +#include <ctime> +#include <iostream> +#include <string> +#include <boost/array.hpp> +#include <boost/bind.hpp> +#include <boost/shared_ptr.hpp> +#include <boost/asio.hpp> + +using boost::asio::ip::udp; + +std::string make_daytime_string() +{ + using namespace std; // For time_t, time and ctime; + time_t now = time(0); + return ctime(&now); +} + +typedef std::map<int, udp::endpoint> nid2endpoint_t; + +class udp_server +{ +public: + udp_server(boost::asio::io_service& io_service, int port, const nid2endpoint_t & nid2endpoint) + : socket_(io_service, udp::endpoint(udp::v4(), port)), + nid2endpoint(nid2endpoint) + { + start_receive(); + } + +private: + void start_receive() + { + socket_.async_receive_from( + boost::asio::buffer(recv_buffer_), remote_endpoint_, + boost::bind(&udp_server::handle_receive, this, + boost::asio::placeholders::error, + boost::asio::placeholders::bytes_transferred)); + } + + void handle_receive(const boost::system::error_code& error, + std::size_t /*bytes_transferred*/) + { + if (!error || error == boost::asio::error::message_size) + { + using namespace std; + using namespace boost::archive; + string s(recv_buffer_.begin(), recv_buffer_.end()); + istringstream ss(s); + binary_iarchive ia(ss); + long long time; + int src, echoer, seqno; + ia & src & echoer & seqno & time; + // cout << "got ping from " << src << " with time " << time << endl; + + const udp::endpoint & back = nid2endpoint.find(src)->second; + + if (src == my_nid) { + long rtt = currentTimeMillis() - time; + cout << "to " << echoer << " seqno " << seqno << " rtt " << rtt << endl; + } else { + boost::shared_ptr<std::string> message( + new std::string(s.begin(), s.end())); + + socket_.async_send_to(boost::asio::buffer(*message), back, + boost::bind(&udp_server::handle_send, this, message, + boost::asio::placeholders::error, + boost::asio::placeholders::bytes_transferred)); + } + + start_receive(); + } + else + { + std::cout << "error: " << error << std::endl; + } + } + + void handle_send(boost::shared_ptr<std::string> /*message*/, + const boost::system::error_code& error, + std::size_t /*bytes_transferred*/) + { + if (error) { + std::cout << "error sending: " << error << std::endl; + } + } + + udp::socket socket_; + udp::endpoint remote_endpoint_; + // std::vector<char> recv_buffer_; + boost::array<char, 60> recv_buffer_; + const nid2endpoint_t & nid2endpoint; +}; + +using namespace std; + +int receiver(string host, int port, const nid2endpoint_t & nid2endpoint) +{ + try + { + udp_server server(io_service, port, nid2endpoint); + io_service.run(); + } + catch (std::exception& e) + { + std::cerr << e.what() << std::endl; + return 1; + } + // std::cout << "receiver started!!!" << std::endl; + + return 0; +} + +int main(int argc, char* argv[]) +{ + if (argc != 2) + { + std::cerr << "Usage: pinger <my_nid>" << std::endl; + return 1; + } + + my_nid = atoi(argv[1]); + + nid2endpoint_t nid2endpoint; + vector<udp::endpoint> endpoints; + string my_host; + int my_port; + { + string line; + int nid = 1; + for (ifstream ifs("hosts"); getline(ifs,line); nid++) { + string host; + istringstream iss(line); + iss >> host; + string port; + if (!(iss >> port)) { + port = default_port; + } + + if (nid == my_nid) { + // found ourselves + my_host = host; + istringstream port_reader(port); + port_reader >> my_port; + } else { + // ping all others + udp::resolver resolver(io_service); + udp::resolver::query query(udp::v4(), host, port); + udp::endpoint endpoint = *resolver.resolve(query); + endpoints.push_back(endpoint); + nid2endpoint[nid] = endpoint; + } + + // cout << host << " " << port << endl; + } + } + + boost::thread_group threads; + threads.create_thread(bind(&sender, endpoints)); + threads.create_thread(bind(&receiver, my_host, my_port, nid2endpoint)); + threads.join_all(); + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 19:18:27
|
Revision: 321 http://assorted.svn.sourceforge.net/assorted/?rev=321&view=rev Author: yangzhang Date: 2008-02-04 11:18:16 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added builder for boost::serialization Added Paths: ----------- sandbox/trunk/src/cc/boost_serialization.mk Added: sandbox/trunk/src/cc/boost_serialization.mk =================================================================== --- sandbox/trunk/src/cc/boost_serialization.mk (rev 0) +++ sandbox/trunk/src/cc/boost_serialization.mk 2008-02-04 19:18:16 UTC (rev 321) @@ -0,0 +1,8 @@ +all: boost_serialization + +boost_serialization: boost_serialization.cc + g++ -O3 -Wall -pipe -o boost_serialization \ + -I/opt/boost-head-2007.03.25/include \ + -L/opt/boost-head-2007.03.25/lib \ + -lboost_serialization-gcc41-mt \ + boost_serialization.cc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 19:15:53
|
Revision: 320 http://assorted.svn.sourceforge.net/assorted/?rev=320&view=rev Author: yangzhang Date: 2008-02-04 11:15:55 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added boost serialization test Added Paths: ----------- sandbox/trunk/src/cc/boost_serialization.cc Added: sandbox/trunk/src/cc/boost_serialization.cc =================================================================== --- sandbox/trunk/src/cc/boost_serialization.cc (rev 0) +++ sandbox/trunk/src/cc/boost_serialization.cc 2008-02-04 19:15:55 UTC (rev 320) @@ -0,0 +1,44 @@ +// vim:et:sw=2:ts=2 + +#include <ctime> +#include <iostream> +#include <sstream> + +#include <sys/time.h> + +#include <boost/archive/binary_iarchive.hpp> +#include <boost/archive/binary_oarchive.hpp> + +using namespace std; +using namespace boost::archive; + +long long currentTimeMillis() { + using namespace std; + long long t; + struct timeval tv; + + gettimeofday(&tv, 0); + + t = tv.tv_sec; + t = (t *1000) + (tv.tv_usec/1000); + + return t; +} + +int main() { + stringstream ss; + long long x = currentTimeMillis(); + + //string s = ss.str(); + //s.c_str(); + + binary_oarchive oa(ss); + oa & x; + + binary_iarchive ia(ss); + ia & x; + + cout << x << endl; + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 19:02:53
|
Revision: 319 http://assorted.svn.sourceforge.net/assorted/?rev=319&view=rev Author: yangzhang Date: 2008-02-04 11:02:59 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added py subproc test Added Paths: ----------- sandbox/trunk/src/py/subprocesses.py Added: sandbox/trunk/src/py/subprocesses.py =================================================================== --- sandbox/trunk/src/py/subprocesses.py (rev 0) +++ sandbox/trunk/src/py/subprocesses.py 2008-02-04 19:02:59 UTC (rev 319) @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# vim:et:sw=2:ts=2 + +# Try passing something as an arg, causing us to exit immediately without +# waiting for the subprocess to finish; notice the subproc lives. + +# Try launching this (without args) in bg and killing it; notice subproc lives. + +# Try ctrl-c on this and wait; notice the subproc dies. + +# Try ctrl-c on this, then c-z, bg, ps; notice the subproc is defunct. + +# Try launching this in bg and kill -s sigint on it; notice the subproc lives. + +from subprocess import * +from sys import * +from time import * + +p = Popen(['sleep','5']) +if len(argv) == 1: + try: p.wait() + except KeyboardInterrupt: print p.poll() + sleep(10) Property changes on: sandbox/trunk/src/py/subprocesses.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 19:01:24
|
Revision: 318 http://assorted.svn.sourceforge.net/assorted/?rev=318&view=rev Author: yangzhang Date: 2008-02-04 11:01:29 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added subprocess bash test Added Paths: ----------- sandbox/trunk/src/bash/subprocess.bash Added: sandbox/trunk/src/bash/subprocess.bash =================================================================== --- sandbox/trunk/src/bash/subprocess.bash (rev 0) +++ sandbox/trunk/src/bash/subprocess.bash 2008-02-04 19:01:29 UTC (rev 318) @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# vim:et:sw=2:ts=2 + +# The subproc (sleep) always lives. + +# Try passing something as an arg, which causes us to exit immediately without +# waiting for the subprocess to finish; notice the subproc lives. + +# Try launching this in bg (without args), and killing it; notice subproc +# lives. + +# Try ctrl-c on this while it's in the fg (without args); notice the subproc +# lives (unlike in python). + +# Try launching this in bg and `kill -s int` on it; notice the subproc lives. + +sleep 5 & + +pid=$! +if (( $# == 0 )) +then wait $pid +fi + +ps $pid Property changes on: sandbox/trunk/src/bash/subprocess.bash ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 18:56:28
|
Revision: 317 http://assorted.svn.sourceforge.net/assorted/?rev=317&view=rev Author: yangzhang Date: 2008-02-04 10:56:28 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added signal test Added Paths: ----------- sandbox/trunk/src/py/signals.py Added: sandbox/trunk/src/py/signals.py =================================================================== --- sandbox/trunk/src/py/signals.py (rev 0) +++ sandbox/trunk/src/py/signals.py 2008-02-04 18:56:28 UTC (rev 317) @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +from signal import * +from time import * + +# without this handler installed, killing our process with sigterm won't +# actually trigger the `finally` +def f(a,b): raise KeyboardInterrupt +signal( SIGTERM, f ) + +try: sleep(1000) +except: print 'except' +finally: print 'finally' Property changes on: sandbox/trunk/src/py/signals.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 18:14:18
|
Revision: 316 http://assorted.svn.sourceforge.net/assorted/?rev=316&view=rev Author: yangzhang Date: 2008-02-04 09:31:01 -0800 (Mon, 04 Feb 2008) Log Message: ----------- updated assorted-site Modified Paths: -------------- assorted-site/trunk/index.txt Modified: assorted-site/trunk/index.txt =================================================================== --- assorted-site/trunk/index.txt 2008-02-04 08:33:44 UTC (rev 315) +++ assorted-site/trunk/index.txt 2008-02-04 17:31:01 UTC (rev 316) @@ -36,7 +36,6 @@ - Meta programming - Object code generation: currently targets Java serialization, emphasizing compactness, speed, and simplicity (done) - - BattleCode composer: express and mix strategies quickly (planning) - TopCoder tools: crawl TopCoder rankings to analyze players. Currently only produces language statistics. (done) - Simple Pre-Processor (spp): tiny implementation of cpp's _object-like This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 08:33:39
|
Revision: 315 http://assorted.svn.sourceforge.net/assorted/?rev=315&view=rev Author: yangzhang Date: 2008-02-04 00:33:44 -0800 (Mon, 04 Feb 2008) Log Message: ----------- updated site Modified Paths: -------------- personal-site/trunk/src/index.txt Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-02-04 08:32:20 UTC (rev 314) +++ personal-site/trunk/src/index.txt 2008-02-04 08:33:44 UTC (rev 315) @@ -87,9 +87,9 @@ - [Technology and Infrastructure for Emerging Regions] (TIER): communications infrastructure based on delay-tolerant data muling, and spoken and written natural language computer interfaces. -- [802.15.4] Simulation Platform in [TinyOS]/[TOSSIM] -- [Recovery-Oriented Computing] (ROC) -- [Microsoft Search] and [Microsoft SharePoint Portal Server] +- [802.15.4] Simulation Platform in [TinyOS]/[TOSSIM]. +- [Recovery-Oriented Computing] (ROC). +- [Microsoft Search] and [Microsoft SharePoint Portal Server]. [Scalable Resilient Overlay Networks]: http://nms.csail.mit.edu/ron/ @@ -142,8 +142,8 @@ [PDF](http://db.csail.mit.edu/pubs/icde07cr.pdf) - Bret Hull, Vladimir Bychkovsky, Yang Zhang, Kevin Chen, Michel Goraczko, - Allen Miu, Eugene Shih, Hari Balakrishnan, Samuel Madden. _CarTel: a - distributed mobile sensor computing system_. Sensys 2006. + Allen Miu, Eugene Shih, Hari Balakrishnan, Samuel Madden. _CarTel: A + Distributed Mobile Sensor Computing System_. Sensys 2006. [PDF](http://portal.acm.org/ft_gateway.cfm?id=1182821&type=pdf&coll=GUIDE&dl=GUIDE&CFID=53267823&CFTOKEN=16451677) <!-- TODO: * means that the authors contributed equally to the project. --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 08:32:23
|
Revision: 314 http://assorted.svn.sourceforge.net/assorted/?rev=314&view=rev Author: yangzhang Date: 2008-02-04 00:32:20 -0800 (Mon, 04 Feb 2008) Log Message: ----------- updated site Modified Paths: -------------- personal-site/trunk/src/index.txt Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-02-04 08:22:56 UTC (rev 313) +++ personal-site/trunk/src/index.txt 2008-02-04 08:32:20 UTC (rev 314) @@ -2,14 +2,13 @@ % Yang Zhang <img src="me-shadow.png" alt="Tim the Beaver and me" style="border: 5px solid; border-color: white; float: right;"/> -<!--  --> <a name="about" /> About me -------- -I'm a grad student working with Prof. [Sam Madden] in [CSAIL] at [MIT]. I +I'm a graduate student working with Prof. [Sam Madden] in [CSAIL] at [MIT]. I graduated from [UC Berkeley] in 2005 with a BS in Electrical Engineering and Computer Science. @@ -61,14 +60,15 @@ <!-- JOSMP: an exokernel for multi-core x86 systems --> <!-- [WebTables]: asdfasdf --> -- [Scalable Resilient Overlay Networks]: making RON scale to thousands of - nodes. +- [Scalable Resilient Overlay Networks]: distributed algorithms and systems to + enable RONs to scale to thousands of nodes. - [Collaborative Filtering Techniques for the NetFlix Prize](http://code.google.com/p/netflix6867/): an exploration of low-rank - matrix factorization and MLE of a flexible mixture model using EM -- [CarTel]: vehicular sensor network platform. - - [Intermittently Connected Embedded - Database] (ICEDB): adaptive continuous + matrix factorization, and of maximum-likelihood estimation of a flexible + mixture model using EM. +- [CarTel]: vehicular sensor network platform that uses open Wi-Fi networks + for data delivery opportunistically. + - [Intermittently Connected Embedded Database] (ICEDB): adaptive continuous query processing system for environments with intermittent and highly variable network connectivity. - [CafNet]: delay-tolerant carry-and-forward networking stack that enables @@ -83,11 +83,12 @@ atomic view of the module's state and their modifications of the state are transactional. --> - Data Triage in the [TelegraphCQ] stream query processing system: an adaptive - architecture for load shedding -- [Technology and Infrastructure for Emerging Regions] (TIER): practical - information and communications technology for developing regions + architecture for load shedding. +- [Technology and Infrastructure for Emerging Regions] (TIER): communications + infrastructure based on delay-tolerant data muling, and spoken and written + natural language computer interfaces. +- [802.15.4] Simulation Platform in [TinyOS]/[TOSSIM] - [Recovery-Oriented Computing] (ROC) -- [802.15.4] Simulation Platform in [TinyOS]/[TOSSIM] - [Microsoft Search] and [Microsoft SharePoint Portal Server] [Scalable Resilient Overlay Networks]: http://nms.csail.mit.edu/ron/ @@ -145,15 +146,16 @@ distributed mobile sensor computing system_. Sensys 2006. [PDF](http://portal.acm.org/ft_gateway.cfm?id=1182821&type=pdf&coll=GUIDE&dl=GUIDE&CFID=53267823&CFTOKEN=16451677) -<!-- * means that the authors contributed equally to the project. --> +<!-- TODO: * means that the authors contributed equally to the project. --> <!-- Co-Authors ----------- +========== - Alon Halevy +- Dave Andersen +- Hari Balakrishnan - Sam Madden -- Hari Balakrishnan --> <a name="classes" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 08:22:50
|
Revision: 313 http://assorted.svn.sourceforge.net/assorted/?rev=313&view=rev Author: yangzhang Date: 2008-02-04 00:22:56 -0800 (Mon, 04 Feb 2008) Log Message: ----------- added exceptions2 Added Paths: ----------- sandbox/trunk/src/hs/Exceptions2.hs Added: sandbox/trunk/src/hs/Exceptions2.hs =================================================================== --- sandbox/trunk/src/hs/Exceptions2.hs (rev 0) +++ sandbox/trunk/src/hs/Exceptions2.hs 2008-02-04 08:22:56 UTC (rev 313) @@ -0,0 +1,15 @@ +{-# LANGUAGE DeriveDataTypeable, PatternSignatures #-} + +import Data.Generics +import Control.Exception + +data E = E1 deriving (Typeable,Show) + +main = do +-- handle print $ throwDyn E1 + (throwDyn E1 >> return ()) `catchDyn` (\(e :: E) -> print e) + +{- + $ runhaskell A.hs + E +-} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 05:28:07
|
Revision: 312 http://assorted.svn.sourceforge.net/assorted/?rev=312&view=rev Author: yangzhang Date: 2008-02-03 21:28:11 -0800 (Sun, 03 Feb 2008) Log Message: ----------- added license Modified Paths: -------------- scala-commons/trunk/README Modified: scala-commons/trunk/README =================================================================== --- scala-commons/trunk/README 2008-02-04 05:20:31 UTC (rev 311) +++ scala-commons/trunk/README 2008-02-04 05:28:11 UTC (rev 312) @@ -7,7 +7,7 @@ Overview -------- -Scala Commons is a general-purpose utility library for the (outstanding) +The Scala Commons is a general-purpose utility library for the (outstanding) [Scala] programming language. Here are some things it covers: - control: `using` for `Closeable`; `time` for wall-clocks; ... @@ -32,6 +32,42 @@ - the [ScalaX] community library - the [ScalaZ] library +License +------- + +Scala Commons is released under a 3-clause BSD-style license, the same as +Scala's license. + + Copyright (c) 2007 The Scala Commons. All rights reserved. + + Permission to use, copy, modify, and distribute this software in source + or binary form for any purpose with or without fee is hereby granted, + provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. Neither the name of the Scala Commons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Contact ------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 05:20:26
|
Revision: 311 http://assorted.svn.sourceforge.net/assorted/?rev=311&view=rev Author: yangzhang Date: 2008-02-03 21:20:31 -0800 (Sun, 03 Feb 2008) Log Message: ----------- clarified license note Modified Paths: -------------- python-commons/trunk/src/commons/__init__.py Modified: python-commons/trunk/src/commons/__init__.py =================================================================== --- python-commons/trunk/src/commons/__init__.py 2008-02-04 04:48:48 UTC (rev 310) +++ python-commons/trunk/src/commons/__init__.py 2008-02-04 05:20:31 UTC (rev 311) @@ -2,9 +2,10 @@ # vim:ft=python:et:sw=4:ts=4 """ -U{Python Commons<http://assorted.sf.net/python-commons>} is a -collection of general-purpose utilities released under the U{PSF -license<http://www.python.org/psf/license.html>}. +U{Python Commons<http://assorted.sf.net/python-commons>} is a collection of +general-purpose utilities released under the U{PSF +license<http://www.python.org/psf/license.html>} (the same license as what +Python is distributed under). You can download the latest releases U{here<http://assorted.sf.net/python-commons/download>}. To install, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 04:48:44
|
Revision: 310 http://assorted.svn.sourceforge.net/assorted/?rev=310&view=rev Author: yangzhang Date: 2008-02-03 20:48:48 -0800 (Sun, 03 Feb 2008) Log Message: ----------- adjusted photo spacing Modified Paths: -------------- personal-site/trunk/src/index.txt personal-site/trunk/static/me-shadow.png personal-site/trunk/static/me-shadow.xcf Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-02-04 04:46:42 UTC (rev 309) +++ personal-site/trunk/src/index.txt 2008-02-04 04:48:48 UTC (rev 310) @@ -1,7 +1,7 @@ % Yang Zhang % Yang Zhang -<img src="me-shadow.png" alt="Tim the Beaver and me" style="border: 20px solid; border-color: white; float: right;"/> +<img src="me-shadow.png" alt="Tim the Beaver and me" style="border: 5px solid; border-color: white; float: right;"/> <!--  --> <a name="about" /> Modified: personal-site/trunk/static/me-shadow.png =================================================================== (Binary files differ) Modified: personal-site/trunk/static/me-shadow.xcf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 04:46:38
|
Revision: 309 http://assorted.svn.sourceforge.net/assorted/?rev=309&view=rev Author: yangzhang Date: 2008-02-03 20:46:42 -0800 (Sun, 03 Feb 2008) Log Message: ----------- added shadow to photo Modified Paths: -------------- personal-site/trunk/src/index.txt Added Paths: ----------- personal-site/trunk/static/me-shadow.png personal-site/trunk/static/me-shadow.xcf Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-02-04 03:47:43 UTC (rev 308) +++ personal-site/trunk/src/index.txt 2008-02-04 04:46:42 UTC (rev 309) @@ -1,8 +1,8 @@ % Yang Zhang % Yang Zhang -<img src="me.jpg" alt="Tim the Beaver and me" style="border: 20px solid; border-color: white; float: right;"/> -<!--  --> +<img src="me-shadow.png" alt="Tim the Beaver and me" style="border: 20px solid; border-color: white; float: right;"/> +<!--  --> <a name="about" /> Added: personal-site/trunk/static/me-shadow.png =================================================================== (Binary files differ) Property changes on: personal-site/trunk/static/me-shadow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: personal-site/trunk/static/me-shadow.xcf =================================================================== (Binary files differ) Property changes on: personal-site/trunk/static/me-shadow.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 03:47:38
|
Revision: 308 http://assorted.svn.sourceforge.net/assorted/?rev=308&view=rev Author: yangzhang Date: 2008-02-03 19:47:43 -0800 (Sun, 03 Feb 2008) Log Message: ----------- renamed Added Paths: ----------- personal-site/trunk/static/icedb-thesis.pdf Removed Paths: ------------- personal-site/trunk/static/main.pdf Copied: personal-site/trunk/static/icedb-thesis.pdf (from rev 306, personal-site/trunk/static/main.pdf) =================================================================== (Binary files differ) Deleted: personal-site/trunk/static/main.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 03:47:22
|
Revision: 307 http://assorted.svn.sourceforge.net/assorted/?rev=307&view=rev Author: yangzhang Date: 2008-02-03 19:47:27 -0800 (Sun, 03 Feb 2008) Log Message: ----------- updated site Modified Paths: -------------- personal-site/trunk/src/index.txt Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-02-04 03:47:00 UTC (rev 306) +++ personal-site/trunk/src/index.txt 2008-02-04 03:47:27 UTC (rev 307) @@ -51,41 +51,111 @@ <a name="projects" /> -Publicly released projects --------------------------- +Projects +-------- Here are the publicly released software projects in which I've been involved. More details when I have time! -- MIT - <!-- - JOSMP: an exokernel for multi-core x86 systems --> - - [Collaborative Filtering for the NetFlix - Prize](http://code.google.com/p/netflix6867/): explored low-rank matrix - factorization and MLE of a flexible mixture model using EM +<!-- multi-core stuff --> +<!-- JOSMP: an exokernel for multi-core x86 systems --> +<!-- [WebTables]: asdfasdf --> + +- [Scalable Resilient Overlay Networks]: making RON scale to thousands of + nodes. +- [Collaborative Filtering Techniques for the NetFlix + Prize](http://code.google.com/p/netflix6867/): an exploration of low-rank + matrix factorization and MLE of a flexible mixture model using EM +- [CarTel]: vehicular sensor network platform. - [Intermittently Connected Embedded - Database](http://cartel.csail.mit.edu/icedb/) (ICEDB): system for data - management and adaptive data collection in mobile sensor networks - - One-hop shortest paths routing for [Resilient Overlay - Networks](http://nms.lcs.mit.edu/projects/ron/) (RON) - - Guarded Atomic Actions for Haskell -- Berkeley - - Data Triage in [TelegraphCQ](http://telegraph.cs.berkeley.edu/): stream query - processing - - [Technology and Infrastructure for Emerging - Regions](http://tier.cs.berkeley.edu/) (TIER) - - [Recovery-Oriented Computing](http://roc.cs.berkeley.edu/) (ROC), Windows - crash dump analysis - - [802.15.4 Simulation in TinyOS](http://tinyos.net/) -- Other - - ZDB: a personal data management system - - [Microsoft - Search](http://www.microsoft.com/windows/products/winfamily/desktopsearch/) - and [Microsoft SharePoint Portal - Server](http://www.microsoft.com/sharepoint/) - - [Simple Publications Manager](http://pubmgr.sf.net/): publication - management web application -- [Assorted Projects](http://assorted.sf.net/): my code dump + Database] (ICEDB): adaptive continuous + query processing system for environments with intermittent and highly + variable network connectivity. + - [CafNet]: delay-tolerant carry-and-forward networking stack that enables + mobile data muling and provides reliable transport on intermittently + connected networks. +- [Guarded Atomic Actions for Haskell]: a Haskell implementation of the + parallelism paradigm known as guarded atomic actions, a form of transactional + memory (used in [Bluespec System Verilog]). <!-- +add more info in a subpage: A module consists of a set of actions, each of +which has a guard. At any given time, all actions whose guards are satisfied +can fire in parallel. Actions running in parallel are always guaranteed an +atomic view of the module's state and their modifications of the state are +transactional. --> +- Data Triage in the [TelegraphCQ] stream query processing system: an adaptive + architecture for load shedding +- [Technology and Infrastructure for Emerging Regions] (TIER): practical + information and communications technology for developing regions +- [Recovery-Oriented Computing] (ROC) +- [802.15.4] Simulation Platform in [TinyOS]/[TOSSIM] +- [Microsoft Search] and [Microsoft SharePoint Portal Server] +[Scalable Resilient Overlay Networks]: http://nms.csail.mit.edu/ron/ + +[CarTel]: http://cartel.csail.mit.edu/ +[Intermittently Connected Embedded Database]: http://cartel.csail.mit.edu/icedb/ +[CafNet]: http://cartel.csail.mit.edu/cafnet/ + +<!-- TODO: mirror this pdf --> + +[Guarded Atomic Actions for Haskell]: http://www.mit.edu/~amdragon/projects/gaah-6.827.pdf + +[TelegraphCQ]: http://telegraph.cs.berkeley.edu/ +[Technology and Infrastructure for Emerging Regions]: http://tier.cs.berkeley.edu/ +[Recovery-Oriented Computing]: http://roc.cs.berkeley.edu/ +[802.15.4]: http://www.networkworld.com/details/6549.html +[Bluespec System Verilog]: http://www.bluespec.com/ +[TinyOS]: http://tinyos.net/ +[TOSSIM]: http://www.cs.berkeley.edu/~pal/research/tossim.html +[Microsoft Search]: http://www.microsoft.com/windows/products/winfamily/desktopsearch/ +[Microsoft SharePoint Portal Server]: http://www.microsoft.com/sharepoint/ + +<a name="software" /> + +Software +-------- + +These are various other software I've worked on, not exclusively associated +with any particular project above. + +- [Assorted Projects]: my code dump +- [Simple Publications Manager]: publication management web application + +[Assorted Projects]: http://assorted.sf.net/ +[Simple Publications Manager]: http://pubmgr.sf.net/ + +<a name="papers" /> + +Papers +------ + +<!-- TODO: mirror papers. --> +<!-- TODO: sigcomm --> +<!-- TODO: webtables --> + +- Yang Zhang. _ICEDB: Intermittently-Connected Continuous Query Processing_. + MS Thesis, January 2008. [PDF](icedb-thesis.pdf) + +- Yang Zhang, Bret Hull, Hari Balakrishnan, Samuel Madden. _ICEDB: + Intermittently-Connected Continuous Query Processing_. ICDE 2007. + [PDF](http://db.csail.mit.edu/pubs/icde07cr.pdf) + +- Bret Hull, Vladimir Bychkovsky, Yang Zhang, Kevin Chen, Michel Goraczko, + Allen Miu, Eugene Shih, Hari Balakrishnan, Samuel Madden. _CarTel: a + distributed mobile sensor computing system_. Sensys 2006. + [PDF](http://portal.acm.org/ft_gateway.cfm?id=1182821&type=pdf&coll=GUIDE&dl=GUIDE&CFID=53267823&CFTOKEN=16451677) + +<!-- * means that the authors contributed equally to the project. --> + +<!-- +Co-Authors +---------- + +- Alon Halevy +- Sam Madden +- Hari Balakrishnan +--> + <a name="classes" /> MIT classes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 03:46:58
|
Revision: 306 http://assorted.svn.sourceforge.net/assorted/?rev=306&view=rev Author: yangzhang Date: 2008-02-03 19:47:00 -0800 (Sun, 03 Feb 2008) Log Message: ----------- added thesis Added Paths: ----------- personal-site/trunk/static/main.pdf Added: personal-site/trunk/static/main.pdf =================================================================== (Binary files differ) Property changes on: personal-site/trunk/static/main.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-04 03:10:45
|
Revision: 305 http://assorted.svn.sourceforge.net/assorted/?rev=305&view=rev Author: yangzhang Date: 2008-02-03 19:10:50 -0800 (Sun, 03 Feb 2008) Log Message: ----------- forgot to ever add this Added Paths: ----------- personal-site/trunk/src/redir-header.html Added: personal-site/trunk/src/redir-header.html =================================================================== --- personal-site/trunk/src/redir-header.html (rev 0) +++ personal-site/trunk/src/redir-header.html 2008-02-04 03:10:50 UTC (rev 305) @@ -0,0 +1 @@ +<meta http-equiv="refresh" content="1;url=http://www.mit.edu/~y_z/" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-03 10:05:59
|
Revision: 304 http://assorted.svn.sourceforge.net/assorted/?rev=304&view=rev Author: yangzhang Date: 2008-02-03 02:06:01 -0800 (Sun, 03 Feb 2008) Log Message: ----------- updated personal site Modified Paths: -------------- personal-site/trunk/Makefile personal-site/trunk/src/index.txt personal-site/trunk/src/redir.txt Modified: personal-site/trunk/Makefile =================================================================== --- personal-site/trunk/Makefile 2008-02-03 10:05:40 UTC (rev 303) +++ personal-site/trunk/Makefile 2008-02-03 10:06:01 UTC (rev 304) @@ -15,7 +15,7 @@ $(REDIR): src/redir.txt out-redir pandoc -s -S --tab-stop=2 -c http://www.mit.edu/~y_z/plain.css \ - src/redir.txt -o $(REDIR) + -H src/redir-header.html src/redir.txt -o $(REDIR) out/dark.css: src/dark.css cpp -P -CC -traditional-cpp $^ $@ Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-02-03 10:05:40 UTC (rev 303) +++ personal-site/trunk/src/index.txt 2008-02-03 10:06:01 UTC (rev 304) @@ -4,7 +4,7 @@ <img src="me.jpg" alt="Tim the Beaver and me" style="border: 20px solid; border-color: white; float: right;"/> <!--  --> -<a name="about"></a> +<a name="about" /> About me -------- @@ -18,7 +18,7 @@ [MIT]: http://mit.edu/ [UC Berkeley]: http://berkeley.edu/ -<a name="contact"></a> +<a name="contact" /> Contact information ------------------- @@ -49,7 +49,7 @@ </script> </div> -<a name="projects"></a> +<a name="projects" /> Publicly released projects -------------------------- @@ -86,7 +86,7 @@ management web application - [Assorted Projects](http://assorted.sf.net/): my code dump -<a name="classes"></a> +<a name="classes" /> MIT classes ----------- @@ -99,6 +99,15 @@ - 6.033 Computer Systems Engineering (TA, spring 2007) - 6.867 Machine Learning (fall 2007) +Links +----- + +- [A Neighborhood of Infinity](http://sigfpe.blogspot.com/) +- [Kernel Trap](http://kerneltrap.org/) +- [Lambda The Ultimate](http://www.lambda-the-ultimate.org/) +- [PBF Comics](http://www.pbfcomics.com/) +- [Tumbolia](http://jorendorff.blogspot.com/) + <div class="footer"> <p>Styles: <a href="plain.html">Plain</a> | <a href="dark.html">Dark</a></p> <p>Valid XHTML 1.0 (<a href="http://validator.w3.org/check/referer">re-validate</a>)</p> Modified: personal-site/trunk/src/redir.txt =================================================================== --- personal-site/trunk/src/redir.txt 2008-02-03 10:05:40 UTC (rev 303) +++ personal-site/trunk/src/redir.txt 2008-02-03 10:06:01 UTC (rev 304) @@ -1,5 +1,4 @@ % Yang Zhang % Yang Zhang -My homepage is currently at -<a href="http://www.mit.edu/~y_z/">http://www.mit.edu/~y_z/</a>. +My homepage is currently at <http://www.mit.edu/~y_z/>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-03 10:05:37
|
Revision: 303 http://assorted.svn.sourceforge.net/assorted/?rev=303&view=rev Author: yangzhang Date: 2008-02-03 02:05:40 -0800 (Sun, 03 Feb 2008) Log Message: ----------- updated site Modified Paths: -------------- assorted-site/trunk/build.bash assorted-site/trunk/index.txt assorted-site/trunk/main.css Modified: assorted-site/trunk/build.bash =================================================================== --- assorted-site/trunk/build.bash 2008-02-03 09:20:34 UTC (rev 302) +++ assorted-site/trunk/build.bash 2008-02-03 10:05:40 UTC (rev 303) @@ -14,7 +14,7 @@ # XXX fix rest later -scp index.html shell-sf:assorted/htdocs/ +scp index.html main.css shell-sf:assorted/htdocs/ exit rewrite() { Modified: assorted-site/trunk/index.txt =================================================================== --- assorted-site/trunk/index.txt 2008-02-03 09:20:34 UTC (rev 302) +++ assorted-site/trunk/index.txt 2008-02-03 10:05:40 UTC (rev 303) @@ -30,7 +30,7 @@ - LZXGrid: an editable table (spreadsheet) widget in OpenLaszlo (done) - System utilities - UDP Prober: small program that logs the RTTs of periodic UDP pings, and an - exercise in using `[boost::asio]` (active) + exercise in using [`boost::asio`] (active) - Throttled Repeater: small program that sends a fixed number of lines at a time from a file to a server over TCP (done) - Meta programming @@ -44,7 +44,7 @@ - Tools for various websites or services - [Facebook](facebook-tools): monitor changes in your Facebook network (done) - - Myspace: crawl profiles within n degrees of you for fast searches (done) + - Myspace: crawl profiles within $n$ degrees of you for fast searches (done) - O'Reilly Safari: cache text for offline reading (abandoned) - Youtube: caches videos from your favorites, playlists, and subscriptions (done) @@ -79,6 +79,15 @@ - [This website](http://assorted.sf.net/) (maintained) - [My personal website](http://www.mit.edu/~y_z/) (maintained) +What the statuses mean: + +- done: no more active development planned, but will generally maintain/fix + issues +- maintained: under continual but gradual growth +- active: development is happening at a faster pace +- abandoned: incomplete; no plans to pick it up again +- hitaus: incomplete; plan to resume development + Other links: - [SourceForge Project Page](http://sf.net/projects/assorted/): @@ -89,6 +98,7 @@ - [TinyOS](http://tinyos.net/): SF-hosted project I've been involved in [BattleCode]: http://battlecode.mit.edu/ +[`boost::asio`]: http://asio.sourceforge.net/ [Greg]: http://people.csail.mit.edu/glittle/ [the Subversion repository]: https://assorted.svn.sourceforge.net/svnroot/assorted [browse the repository]: http://assorted.svn.sourceforge.net/viewvc/assorted/ Modified: assorted-site/trunk/main.css =================================================================== --- assorted-site/trunk/main.css 2008-02-03 09:20:34 UTC (rev 302) +++ assorted-site/trunk/main.css 2008-02-03 10:05:40 UTC (rev 303) @@ -20,7 +20,7 @@ }*/ a { - color: blue; + color: #0000bb; text-decoration: underline; } /*a:visited { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |