assorted-commits Mailing List for Assorted projects (Page 47)
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-05-08 20:17:33
|
Revision: 752 http://assorted.svn.sourceforge.net/assorted/?rev=752&view=rev Author: yangzhang Date: 2008-05-08 13:17:35 -0700 (Thu, 08 May 2008) Log Message: ----------- fixed long-standing typo Modified Paths: -------------- configs/trunk/bootstrap.bash Modified: configs/trunk/bootstrap.bash =================================================================== --- configs/trunk/bootstrap.bash 2008-05-08 20:16:13 UTC (rev 751) +++ configs/trunk/bootstrap.bash 2008-05-08 20:17:35 UTC (rev 752) @@ -61,7 +61,7 @@ armed="$prefix/armed"; \ dosu echo testing sudo; \ ;; - locall ) \ + local ) \ sudo=(); \ prefix=~/.local; \ pkg="$prefix/pkg"; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 20:16:31
|
Revision: 751 http://assorted.svn.sourceforge.net/assorted/?rev=751&view=rev Author: yangzhang Date: 2008-05-08 13:16:13 -0700 (Thu, 08 May 2008) Log Message: ----------- added some links Modified Paths: -------------- simple-build/trunk/README Modified: simple-build/trunk/README =================================================================== --- simple-build/trunk/README 2008-05-08 19:35:24 UTC (rev 750) +++ simple-build/trunk/README 2008-05-08 20:16:13 UTC (rev 751) @@ -114,6 +114,8 @@ - support on other platforms (e.g. pthread -> thr on BSD) - look into: - [precompiled headers] + - [tamer] + - [wtf] - [lzz], [preprocess] - [autodepend] - selective target specification: enable configuration of rules (esp. `all`) to @@ -193,7 +195,9 @@ [precompiled headers]: http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html [lzz]: http://www.lazycplusplus.com/ [preprocess]: http://os.inf.tu-dresden.de/~hohmuth/prj/preprocess/ +[tamer]: http://www.read.cs.ucla.edu/tamer/ [autodepend]: http://autodepend.sourceforge.net/ +[wtf]: http://nmstl.sourceforge.net/ [YAML]: http://yaml.org/ [automatically generating dependencies]: http://make.paulandlesley.org/autodep.html @@ -215,3 +219,10 @@ [clump]: http://www.fexl.com/clump/ [rake]: http://rake.rubyforge.org/ [rant]: http://rant.rubyforge.org/ + +Here are some interesting articles: + +- [The Quest for the Perfect Build + System](http://www.gamesfromwithin.com/articles/0506/000092.html) +- [The Quest for the Perfect Build System Part + 2](http://www.gamesfromwithin.com/articles/0509/000100.html) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:35:28
|
Revision: 750 http://assorted.svn.sourceforge.net/assorted/?rev=750&view=rev Author: yangzhang Date: 2008-05-08 12:35:24 -0700 (Thu, 08 May 2008) Log Message: ----------- adapted for scala 2.7.0 Modified Paths: -------------- scala-commons/trunk/src/commons/extras/JavaBib.scala scala-commons/trunk/src/commons/extras/SunHttpServer.scala Modified: scala-commons/trunk/src/commons/extras/JavaBib.scala =================================================================== --- scala-commons/trunk/src/commons/extras/JavaBib.scala 2008-05-08 19:34:26 UTC (rev 749) +++ scala-commons/trunk/src/commons/extras/JavaBib.scala 2008-05-08 19:35:24 UTC (rev 750) @@ -7,17 +7,17 @@ object JavaBib { type Entry = Map[String, Seq[String]] - def list2buffer[a](xs: java.util.List) = new jcl.BufferWrapper[a] { + def list2buffer[a](xs: java.util.List[a]) = new jcl.BufferWrapper[a] { override def underlying = xs } def convert(entry: BibtexEntry): Entry = { val map = new jcl.MapWrapper[String, BibtexAbstractValue] { - override def underlying = entry.getFields + override def underlying = entry.getFields.asInstanceOf[java.util.Map[String,BibtexAbstractValue]] } val mappings = for ((k,uncasted) <- map.elements) yield { val newV = uncasted match { - case v: BibtexPersonList => list2buffer(v getList) - case v: BibtexString => List(v getContent) + case v: BibtexPersonList => list2buffer(v.getList.asInstanceOf[java.util.List[String]]) + case v: BibtexString => List(v.getContent) } (k,newV) } @@ -29,7 +29,7 @@ val file = new BibtexFile val parser = new BibtexParser(false) parser parse (file, reader) - val entries = list2buffer[BibtexEntry](file getEntries) map convert + val entries = list2buffer[BibtexEntry](file.getEntries.asInstanceOf[java.util.List[BibtexEntry]]) map convert (entries, parser.getExceptions) } } Modified: scala-commons/trunk/src/commons/extras/SunHttpServer.scala =================================================================== --- scala-commons/trunk/src/commons/extras/SunHttpServer.scala 2008-05-08 19:34:26 UTC (rev 749) +++ scala-commons/trunk/src/commons/extras/SunHttpServer.scala 2008-05-08 19:35:24 UTC (rev 750) @@ -21,7 +21,7 @@ server createContext ("/", new HttpHandler { override def handle(t: HttpExchange) { val headers = { - val hs = new jcl.MapWrapper[String,java.util.List] { + val hs = new jcl.MapWrapper[String,java.util.List[String]] { override def underlying = t.getRequestHeaders } Map(hs.elements map { case (k,v) => This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:34:53
|
Revision: 749 http://assorted.svn.sourceforge.net/assorted/?rev=749&view=rev Author: yangzhang Date: 2008-05-08 12:34:26 -0700 (Thu, 08 May 2008) Log Message: ----------- clarified some documentation; fixed splitBy() eagerness bug Modified Paths: -------------- scala-commons/trunk/src/commons/Collections.scala Modified: scala-commons/trunk/src/commons/Collections.scala =================================================================== --- scala-commons/trunk/src/commons/Collections.scala 2008-05-08 19:32:41 UTC (rev 748) +++ scala-commons/trunk/src/commons/Collections.scala 2008-05-08 19:34:26 UTC (rev 749) @@ -317,6 +317,7 @@ /** * Given a list of sublists, return pairs of the first element of each * sublist along with the remaining elements. Empty sublists are ignored. + * Useful in composition with groupByHeaders. * <p> * <code> * separateHeads([[a,b,c],[d,e,f,g],[],[h]]) @@ -399,10 +400,10 @@ * </code> */ def splitBy[a](xs: Seq[a])(pred: a => Boolean): Stream[Seq[a]] = { - val consider = xs dropWhile pred - if (consider.length == 0) { + if (xs.length == 0) { Stream.empty } else { + val consider = xs dropWhile pred val (take, rest) = spanBy(consider)(not(pred)) Stream.cons(take, splitBy(rest)(pred)) } @@ -500,6 +501,8 @@ * predicate. A reverse dropWhile. * <p> * <code>truncateWhile([1,2,3,4,5], (_ != 3)) == [1,2,3]</code> + * <p> + * <code>truncateWhile("!!hello!!", (=='!')) == "!!hello"</code> */ def truncateWhile[a](seq: Seq[a])(pred: a => Boolean) = (seq.reverse dropWhile pred).reverse This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:32:40
|
Revision: 748 http://assorted.svn.sourceforge.net/assorted/?rev=748&view=rev Author: yangzhang Date: 2008-05-08 12:32:41 -0700 (Thu, 08 May 2008) Log Message: ----------- added closing RAII tool and die() Added Paths: ----------- cpp-commons/trunk/src/commons/closing.h cpp-commons/trunk/src/commons/die.h Added: cpp-commons/trunk/src/commons/closing.h =================================================================== --- cpp-commons/trunk/src/commons/closing.h (rev 0) +++ cpp-commons/trunk/src/commons/closing.h 2008-05-08 19:32:41 UTC (rev 748) @@ -0,0 +1,19 @@ +#ifndef COMMONS_CLOSING_H +#define COMMONS_CLOSING_H + +namespace +{ + + template<typename T> + class closing + { + public: + closing(T x) : x(x) {} + ~closing() { close(x); } + private: + T x; + }; + +} + +#endif Added: cpp-commons/trunk/src/commons/die.h =================================================================== --- cpp-commons/trunk/src/commons/die.h (rev 0) +++ cpp-commons/trunk/src/commons/die.h 2008-05-08 19:32:41 UTC (rev 748) @@ -0,0 +1,33 @@ +#ifndef COMMONS_DIE_H +#define COMMONS_DIE_H + +#include <cerrno> +#include <cstdio> +#include <cstdarg> +#include <cstring> +#include <cstdlib> + +namespace commons { + + /** + * Print an error message and exit. Acts like perror() if \p format doesn't + * end with "\n". + * + * TODO: move into C Commons. + */ + void + die(const char *format, ...) + { + const char *errstr; + va_list val; + va_start(val, format); + errstr = strerror(errno); + vfprintf(stderr, format, val); + if (strchr(format, '\n') == NULL) + fprintf(stderr, ": %s\n", errstr); + exit(1); + } + +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:31:48
|
Revision: 747 http://assorted.svn.sourceforge.net/assorted/?rev=747&view=rev Author: yangzhang Date: 2008-05-08 12:31:55 -0700 (Thu, 08 May 2008) Log Message: ----------- added basic sockets.h with just a tcp_listener Added Paths: ----------- cpp-commons/trunk/src/commons/sockets.h Added: cpp-commons/trunk/src/commons/sockets.h =================================================================== --- cpp-commons/trunk/src/commons/sockets.h (rev 0) +++ cpp-commons/trunk/src/commons/sockets.h 2008-05-08 19:31:55 UTC (rev 747) @@ -0,0 +1,53 @@ +#ifndef COMMONS_SOCKETS_H +#define COMMONS_SOCKETS_H + +#include <arpa/inet.h> +#include <netdb.h> +#include <netinet/in.h> +#include <strings.h> +#include <sys/socket.h> +#include <unistd.h> + +#include <commons/check.h> + +namespace commons +{ + + /** + * Create a listener socket, with SO_REUSEADDR. + * \param[in] port The port to listen on. + * \return The listener socket. + */ + int + tcp_listen(int port) + { + // Create the socket. + int sfd = checknneg(socket(PF_INET, SOCK_STREAM, 0)); + + try { + // Create the local socket address. + struct sockaddr_in sa; + bzero(&sa, sizeof(sa)); + sa.sin_family = AF_INET; + sa.sin_port = htons(port); + sa.sin_addr.s_addr = htonl(INADDR_ANY); + + // Configure the socket. + int n = 1; + check0x(setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&n, sizeof(n))); + + // Bind the socket to the local socket address. + check0x(bind(sfd, (struct sockaddr*) &sa, sizeof(struct sockaddr_in))); + + // Start listening. + check0x(listen(sfd, 256)); + + return sfd; + } catch (...) { + close(sfd); + throw; + } + } +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:31:14
|
Revision: 746 http://assorted.svn.sourceforge.net/assorted/?rev=746&view=rev Author: yangzhang Date: 2008-05-08 12:31:11 -0700 (Thu, 08 May 2008) Log Message: ----------- forgot to add this earlier (for boost/threads stuff) Added Paths: ----------- cpp-commons/trunk/src/commons/boost/delegates.h Added: cpp-commons/trunk/src/commons/boost/delegates.h =================================================================== --- cpp-commons/trunk/src/commons/boost/delegates.h (rev 0) +++ cpp-commons/trunk/src/commons/boost/delegates.h 2008-05-08 19:31:11 UTC (rev 746) @@ -0,0 +1,35 @@ +#ifndef COMMONS_DELEGATES_H +#define COMMONS_DELEGATES_H + +#include <boost/function.hpp> +#include <boost/scoped_ptr.hpp> + +namespace commons +{ + + using namespace boost; + + /** + * Delegate for running a 0-ary void function. + */ + void + run_function0(void *p) + { + scoped_ptr< const function0<void> > pf((const function0<void>*) p); + try { (*pf)(); } + catch (exception ex) { cerr << ex.what() << endl; } + } + + /** + * NULL void*-returning delegate for running a 0-ary void function. + */ + void* + run_function0_null(void* p) + { + run_function0(p); + return NULL; + } + +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:29:52
|
Revision: 745 http://assorted.svn.sourceforge.net/assorted/?rev=745&view=rev Author: yangzhang Date: 2008-05-08 12:29:55 -0700 (Thu, 08 May 2008) Log Message: ----------- added support for state threads (ST) Added Paths: ----------- cpp-commons/trunk/src/commons/st/ cpp-commons/trunk/src/commons/st/st.h Added: cpp-commons/trunk/src/commons/st/st.h =================================================================== --- cpp-commons/trunk/src/commons/st/st.h (rev 0) +++ cpp-commons/trunk/src/commons/st/st.h 2008-05-08 19:29:55 UTC (rev 745) @@ -0,0 +1,118 @@ +#ifndef COMMONS_ST_ST_H +#define COMMONS_ST_ST_H + +#include <st.h> +#include <stx.h> +#include <commons/sockets.h> +#include <commons/boost/delegates.h> +#include <boost/function.hpp> + +namespace commons +{ + using namespace boost; + + enum { default_stack_size = 65536 }; + + /** + * RAII to st_netfd_close() a netfd. + */ + class st_closing + { + public: + st_closing(st_netfd_t x) : attached(true), x(x) {} + ~st_closing() { if (attached) st_netfd_close(x); } + void detach() { attached = false; } + private: + bool attached; + st_netfd_t x; + }; + + /** + * non-copyable. + * \todo remove? this seems to be bad if it closes the file! + */ + class stfd + { + public: + stfd(st_netfd_t fd) : fd_(fd), sclose(fd) {} + const st_netfd_t fd() const { return fd_; } + private: + const st_netfd_t fd_; + st_closing sclose; + }; + + /** + * Run a function in pthread. + * \return The new pthread_t on success, 0 on failure. + * \todo Is it safe to treat the pthread_t as a pointer? + */ + st_thread_t + st_spawn(const function0<void>& f) + { + return st_thread_create(&run_function0_null, + (void*) new function0<void>(f), + true, + default_stack_size); + } + + /** + * Connect to a TCP socket address. + * \param[in] host Either an IP address or hostname. + * \param[in] port The destination port. + * \param[in] timeout The timeout for each of the DNS lookup and the connect + * operation. + * \todo Create variants that take or return the sockaddr. + */ + st_netfd_t + st_tcp_connect(char *host, int port, st_utime_t timeout) + { + // Create remote socket address. + struct sockaddr_in sa; + bzero(&sa, sizeof sa); + sa.sin_family = AF_INET; + sa.sin_port = htons(port); + + // First try to parse as IP address. Note: inet_addr() is obsolete. + if (inet_aton(host, &sa.sin_addr) != 0) { + // Then look up by hostname. + check0x(stx_dns_getaddr(host, &sa.sin_addr, timeout)); + } + + // Create the socket. + int sfd = checknneg(socket(PF_INET, SOCK_STREAM, 0)); + st_netfd_t nfd = st_netfd_open_socket(sfd); + + // Connect. + try { + check0x(st_connect(nfd, (struct sockaddr*) &sa, sizeof sa, timeout)); + return nfd; + } catch (...) { + st_netfd_close(nfd); + throw; + } + } + + /** + * Create a listener st_netfd_t. + * \param[in] port The port to listen on. + * \return The st_netfd_t. + */ + st_netfd_t + st_tcp_listen(int port) + { + int sfd = tcp_listen(port); + try { + // Create a net file descriptor around a listener socket. + st_netfd_t nfd = st_netfd_open_socket(sfd); + checkpass(nfd); + //st_netfd_t nfd = checkpass(st_netfd_open_socket(sfd)); + return nfd; + } catch (...) { + close(sfd); + throw; + } + } + +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:29:49
|
Revision: 744 http://assorted.svn.sourceforge.net/assorted/?rev=744&view=rev Author: yangzhang Date: 2008-05-08 12:29:35 -0700 (Thu, 08 May 2008) Log Message: ----------- added support for libtask Added Paths: ----------- cpp-commons/trunk/src/commons/task/ cpp-commons/trunk/src/commons/task/net.h cpp-commons/trunk/src/commons/task/task.h Added: cpp-commons/trunk/src/commons/task/net.h =================================================================== --- cpp-commons/trunk/src/commons/task/net.h (rev 0) +++ cpp-commons/trunk/src/commons/task/net.h 2008-05-08 19:29:35 UTC (rev 744) @@ -0,0 +1,97 @@ +#ifndef COMMONS_TASK_NET_H +#define COMMONS_TASK_NET_H + +#include <task.h> + +namespace commons +{ + + /** + * A simple file-descriptor. + */ + class fd + { + private: + int f; + + public: + fd(int f) : f(f) {} + + /** + * Send data. + * \bug Unsafe demotion on \p len. + * \exception check_exception Write failed; not everything was written. + */ + void + write(char *data, size_t len) + { + check(fdwrite(f, data, len) == (int)len); + } + + /** + * Read data. + * \bug Unsafe demotion on \p len. Unsafe demotion on return val. + * \exception check_exception Read failed. + */ + int + read(char *data, size_t len) + { + int res = fdread(f, data, len); + check(res >= 0); + return res; + } + +// /** +// * Read data until \p len. +// * \bug Unsafe demotion on \p len. +// * \exception check_exception Read failed. +// */ +// int +// read(char *data, size_t len) +// { +// while (true) { +// int count = fdread(f, data, len); +// check(count > 0); +// len -= count; +// } +// } + + }; + + typedef fd socket; + + /** + * A TCP listener. + */ + class tcplistener + { + private: + int fd; + + public: + /** + * Bind to the given host and port and start listening. + * \param[in] host If NULL, then bind to all local addresses. + * \param[in] port The port to bind to. + * \exception check_exception Call to netannounce() failed. + */ + tcplistener(char *host, int port) : fd(-1) + { + fd = netannounce(TCP, host, port); + check(fd); + } + + /** + * Accept a connection, ignoring the remote socket address. + * \return The client connection socket. + */ + socket accept() + { + int cli = netaccept(fd, NULL, NULL); + return socket(cli); + } + }; + +} + +#endif Added: cpp-commons/trunk/src/commons/task/task.h =================================================================== --- cpp-commons/trunk/src/commons/task/task.h (rev 0) +++ cpp-commons/trunk/src/commons/task/task.h 2008-05-08 19:29:35 UTC (rev 744) @@ -0,0 +1,21 @@ +#ifndef COMMONS_TASK_H +#define COMMONS_TASK_H + +#include <commons/boost/delegates.h> + +namespace commons +{ + + const unsigned int default_stack = 32768; + + int + spawntask(const function0<void>& f) + { + return taskcreate(&run_function0, + (void*) new function0<void>(f), + default_stack); + } + +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:28:20
|
Revision: 743 http://assorted.svn.sourceforge.net/assorted/?rev=743&view=rev Author: yangzhang Date: 2008-05-08 12:28:15 -0700 (Thu, 08 May 2008) Log Message: ----------- added release reminders Modified Paths: -------------- shell-tools/trunk/src/bash-commons/assorted.bash Modified: shell-tools/trunk/src/bash-commons/assorted.bash =================================================================== --- shell-tools/trunk/src/bash-commons/assorted.bash 2008-05-08 19:25:04 UTC (rev 742) +++ shell-tools/trunk/src/bash-commons/assorted.bash 2008-05-08 19:28:15 UTC (rev 743) @@ -286,6 +286,8 @@ esac googlecode_upload -p assorted -s "$summary" -l "$labels" $file done + + echo "Don't forget to tag this release in svn and to announce it on SF news!" } "$@" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:25:16
|
Revision: 742 http://assorted.svn.sourceforge.net/assorted/?rev=742&view=rev Author: yangzhang Date: 2008-05-08 12:25:04 -0700 (Thu, 08 May 2008) Log Message: ----------- refactored delegates into delegates.h Modified Paths: -------------- cpp-commons/trunk/src/commons/boost/threads.h Modified: cpp-commons/trunk/src/commons/boost/threads.h =================================================================== --- cpp-commons/trunk/src/commons/boost/threads.h 2008-05-08 19:24:40 UTC (rev 741) +++ cpp-commons/trunk/src/commons/boost/threads.h 2008-05-08 19:25:04 UTC (rev 742) @@ -9,6 +9,7 @@ #include <boost/function.hpp> #include <commons/check.h> +#include <commons/boost/delegates.h> #include <commons/threads.h> namespace commons @@ -17,18 +18,6 @@ using namespace boost; /** - * Helper for launching new threads. - */ - void* - run_function0(void* p) - { - const function0<void>* pf = (const function0<void>*) p; - (*pf)(); - delete pf; - return NULL; - } - - /** * Run a function in pthread. * \return The new pthread_t on success, 0 on failure. * TODO: Is it safe to treat the pthread_t as an integral type? @@ -37,7 +26,7 @@ spawn(const function0<void>& f) { pthread_t t; - return pthread_create(&t, NULL, &run_function0, (void*) new function0<void>(f)) == 0 ? t : 0; + return pthread_create(&t, NULL, &run_function0_null, (void*) new function0<void>(f)) == 0 ? t : 0; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:25:06
|
Revision: 741 http://assorted.svn.sourceforge.net/assorted/?rev=741&view=rev Author: yangzhang Date: 2008-05-08 12:24:40 -0700 (Thu, 08 May 2008) Log Message: ----------- added checkdie; reformatting; sprinkled documentation; added some todos; added more functions to back the macros Modified Paths: -------------- cpp-commons/trunk/src/commons/check.h Modified: cpp-commons/trunk/src/commons/check.h =================================================================== --- cpp-commons/trunk/src/commons/check.h 2008-05-08 19:22:53 UTC (rev 740) +++ cpp-commons/trunk/src/commons/check.h 2008-05-08 19:24:40 UTC (rev 741) @@ -1,13 +1,20 @@ #ifndef COMMONS_CHECK_H #define COMMONS_CHECK_H +#define buflen 4096 + #include <exception> #include <sstream> #include <string> +#include <commons/die.h> namespace commons { + // TODO: deal with va args + // TODO: provide strerror in other functions too + // TODO: better way to deal with errno? (rather than resetting it) + using namespace std; class check_exception : public exception @@ -15,54 +22,155 @@ public: check_exception(const string & name) : name(name) {} virtual ~check_exception() throw() {} + const char *what() const throw() { return name.c_str(); } private: const string name; }; inline void - _check(bool cond, const char *msg, const char *file, int line) + _vcheck(bool cond, const char *file, int line, const char *fmt, va_list ap) { if (!cond) { stringstream ss; - ss << file << ':' << line << ": "; - if (msg != NULL) ss << msg; + ss << "failed check in " << file << ':' << line << ": "; + if (fmt != NULL) { + char buf[buflen]; + vsnprintf(buf, buflen, fmt, ap); + ss << buf; + } ss << endl; throw check_exception(ss.str()); } } + inline void + _check(bool cond, const char *file, int line, const char *fmt, ...) + { + va_list ap; + va_start(ap, fmt); + _vcheck(cond, file, line, fmt, ap); + va_end(ap); + } + + inline void + _check(bool cond, const char *file, int line) + { + _check(cond, file, line, NULL); + } + + template<typename T> inline T + _checkpass(T x, const char *file, int line) + { + _check(x, file, line); + return x; + } + + template<typename T> inline T + _checknneg(T x, const char *file, int line) + { + _check(x >= 0, file, line, "expecting non-negative, got %d", x); + return x; + } + + template<typename T> inline void + _check0(T x, const char *file, int line) + { + // Valid error numbers are all non-zero; errno is never set to zero by any + // library function. We reset errno here. + if (errno == 0) { + _check(x == 0, file, line, "expecting 0, got %d", x); + } else { + int e = errno; + errno = 0; + _check(x == 0, file, line, "expecting 0, got %d: %s", x, + strerror(e)); + } + } + + template<typename T, typename U> inline void + _checkeq(T l, U r, const char *file, int line) + { + if (l != r) { + stringstream ss; + ss << "expecting " << l << " == " << r; + _check(false, file, line, ss.str().c_str()); + } + } + } -#define check(cond) _check(cond, NULL, __FILE__, __LINE__) +/** + * Similar to assert(), but is not conditionally compiled, so this is safe to + * use as a guard against expected failures (such as checking return codes). + * This is a macro for two reasons: (1) the file and line, and (2) the lazy + * evaluation of msg. + */ +#define check(cond, msg...) _check(cond, __FILE__, __LINE__, ## msg) - /** - * Similar to assert(), but is not conditionally compiled, so this is safe to - * use as a guard against expected failures (such as checking return codes). - * This is a macro for two reasons: (1) the file and line, and (2) the lazy - * evaluation of msg. - */ -#define checkmsg(cond, msg) \ - bool b__ = cond; \ +/** + * Same as check(), but additionally returns the value that was passed in. The + * value is passed by copy, and not reference, since this function is + * frequently wrapped around a call to another function (to check that its + * return value is non-zero or not false). This is suitable for small, + * copyable pieces of data, such as integers, file descriptors, pointers, etc. + */ +#define checkpass(expr, msg...) _checkpass(expr, __FILE__, __LINE__, ## msg) + +/** + * Checks that the value is non-negative. + */ +#define checknneg(expr, msg...) _checknneg(expr, __FILE__, __LINE__, ## msg) + +/** + * Checks that the value is 0. Same as check0(), but throws an error rather + * than return. Also clears the errno on error. The resulting exception + * includes the strerror(). + */ +#define check0x(expr, msg...) _check0(expr, __FILE__, __LINE__, ## msg) + +/** + * Checks that the values are equal. The exception will include both values, + * as formatted by ostream <<. + */ +#define checkeq(l, r, msg...) _checkeq(l, r, __FILE__, __LINE__, ## msg) + +#if 0 +#define checkmsg(cond, msg) \ + bool b__ = cond; \ if (!b__) _check(b__, (msg), __FILE__, __LINE__) -// TODO: half-written -#define checkmsgf(cond, msg, ...) \ - do { \ - bool b__ = cond; \ - if (!b__) { \ - char s__[4096]; \ - snprintf(s, ); \ - _check(b__, s__, __FILE__, __LINE__); \ - } \ +#define checkmsgf(cond, msg...) \ + do { \ + bool b__ = cond; \ + if (!b__) { \ + char s__[4096]; \ + snprintf(s, msg); \ + _check(b__, s__, __FILE__, __LINE__); \ + } \ } while (0) +#endif -#define check0(expr) \ - do { \ - typeof(expr) r__ = expr; \ - if (r__ != 0) { \ - return r__; \ - } \ +/** + * Checks that the value is 0, otherwise returns the value (representing an + * error). + */ +#define check0(expr) \ + do { \ + typeof(expr) r__ = expr; \ + if (r__) { \ + return r__; \ + } \ } while (0) +/** + * Checks that the value is true or non-zero, otherwise dies (calls die()). + */ +#define checkdie(expr, msg...) \ + do { \ + if (!expr) { \ + die(msg); \ + } \ + } while (0) + #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:22:52
|
Revision: 740 http://assorted.svn.sourceforge.net/assorted/?rev=740&view=rev Author: yangzhang Date: 2008-05-08 12:22:53 -0700 (Thu, 08 May 2008) Log Message: ----------- added some documentation to deque Modified Paths: -------------- cpp-commons/trunk/src/commons/deque.h Modified: cpp-commons/trunk/src/commons/deque.h =================================================================== --- cpp-commons/trunk/src/commons/deque.h 2008-05-08 19:21:30 UTC (rev 739) +++ cpp-commons/trunk/src/commons/deque.h 2008-05-08 19:22:53 UTC (rev 740) @@ -8,6 +8,14 @@ { using namespace std; + /** + * A simple deque implementation that uses coarse-grained allocation (linked + * lists of chunks). This is very incomplete (e.g., you can only put things + * in, and can't get them back out!). + * + * \note This may be deprecated in favor of just using an alternative + * allocator with std::deque. + */ template <typename T> class deque { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:21:29
|
Revision: 739 http://assorted.svn.sourceforge.net/assorted/?rev=739&view=rev Author: yangzhang Date: 2008-05-08 12:21:30 -0700 (Thu, 08 May 2008) Log Message: ----------- added processing of links.txt; fixed omitted footer; added some more redirection sites Modified Paths: -------------- personal-site/trunk/Makefile Modified: personal-site/trunk/Makefile =================================================================== --- personal-site/trunk/Makefile 2008-05-08 19:20:48 UTC (rev 738) +++ personal-site/trunk/Makefile 2008-05-08 19:21:30 UTC (rev 739) @@ -23,12 +23,14 @@ $(INDEX): $(DARK) ln -sf plain.html $(INDEX) -$(PLAIN): src/index.txt src/header.html out src/footer.html src/recommendations.txt - pandoc -s -S --tab-stop=2 -H src/header.html src/index.txt \ +$(PLAIN): src/index.txt src/header.html out src/footer.html src/recommendations.txt src/links.txt + pandoc -s -S --tab-stop=2 -H src/header.html -A src/footer.html src/index.txt \ -c plain.css | \ $(MUNGEMAIL) > $(PLAIN) - pandoc -s -S --tab-stop=2 -H src/header.html src/recommendations.txt \ + pandoc -s -S --tab-stop=2 -H src/header.html -A src/footer.html src/recommendations.txt \ -c plain.css -o out/recommendations.html + pandoc -s -S --tab-stop=2 -H src/header.html -A src/footer.html src/links.txt \ + -c plain.css -o out/links.html $(DARK): src/index.txt src/header.html src/dark-prologue.html src/dark-epilogue.html out pandoc -s -S --tab-stop=2 -H src/header.html src/index.txt \ @@ -43,6 +45,8 @@ scp $(REDIR) ocf:public_html/ scp $(REDIR) pdos:public_html/ scp $(REDIR) lin:web_scripts/ + scp $(REDIR) nms:public_html/ + scp $(REDIR) hv:public_html/ clean: rm -rf out This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:20:50
|
Revision: 738 http://assorted.svn.sourceforge.net/assorted/?rev=738&view=rev Author: yangzhang Date: 2008-05-08 12:20:48 -0700 (Thu, 08 May 2008) Log Message: ----------- added outline of library contents; added more related work Modified Paths: -------------- cpp-commons/trunk/README Modified: cpp-commons/trunk/README =================================================================== --- cpp-commons/trunk/README 2008-05-08 19:20:17 UTC (rev 737) +++ cpp-commons/trunk/README 2008-05-08 19:20:48 UTC (rev 738) @@ -9,19 +9,50 @@ language. The library is nascent, so it doesn't have enough to warrant a release. This is a library of header files, in the same spirit as [boost]. +Here are some of the features present in the library: + +- check macros (assertions that aren't meant to be removed in releases) +- RAII utilities, such as for closing file descriptors +- low-level system information from cpuid +- file I/O utilities, such as reading complete files +- hash functions +- pseudo-random number generators +- error handling, such as `die()` +- function delegates (for use with C functions that take `(void*)(void*)`) +- region-based allocation +- bundles of header includes +- socket utilities +- C functions for string manipulation +- bit manipulation +- C++ support for pthreads, but allowing the user to access the underlying + `pthread_t` (a major annoyance of using boost threads was its complete + encapsulation) +- portable re-implementations of pthread primitives such as barriers +- C++ support for [State Threads] +- utilities for [tamer] + +[State Threads]: http://state-threads.sourceforge.net/ + Related Work ------------ Code found here generally tries to complement code in the following other handy libraries: -- [boost] -- [libstdc++] -- [nmstl] +- [boost]: mountains of goodness +- [libstdc++]: GNU's popular STL implementation +- [stlport]: portable SGI-derived STL implementation that has the extensions + like `hash_map` +- [State Threads]: lightweight cooperative threads library that focuses on + performance and provides network IO. [boost]: http://boost.org/ [libstdc++]: http://gcc.gnu.org/libstdc++/ -[nmstl]: http://nmstl.sourceforge.net/ +[stlport]: http://www.stlport.org/ +[State Threads]: http://state-threads.sf.net/ +[Pth]: http://www.gnu.org/software/pth/ +[libtask]: http://swtch.com/libtask/ +[tamer]: http://www.read.cs.ucla.edu/tamer/ Some other general-purpose libraries which I haven't looked at in-depth: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:20:39
|
Revision: 737 http://assorted.svn.sourceforge.net/assorted/?rev=737&view=rev Author: yangzhang Date: 2008-05-08 12:20:17 -0700 (Thu, 08 May 2008) Log Message: ----------- fixed physical address; added josmp, hstore, gbookmark2delicious; added links; pdf -> pptx Modified Paths: -------------- personal-site/trunk/src/index.txt Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-05-08 19:19:08 UTC (rev 736) +++ personal-site/trunk/src/index.txt 2008-05-08 19:20:17 UTC (rev 737) @@ -41,7 +41,7 @@ item( 'Jabber (Google)', 'xmpp:', 'gmail.com', 'yaaang' ); item( 'Skype', 'callto://', 'yaaang' ); item( 'FreeNode', 'irc://irc.freenode.org/', 'zeeeee' ); // TODO fix - item( 'Office', 'MIT/CSAIL <a href="http://whereis.mit.edu/map-jpg?selection=32&Buildings=go">32</a>-<a href="http://www.csail.mit.edu/resources/maps/9G/G920.gif">G920</a>, <a href="http://www.eecs.mit.edu/stata-link.html">Stata Center</a>, <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=32+Vassar+St,+Cambridge,+MA+02139&sll=42.357926,-71.093616&sspn=0.00842,0.01575&ie=UTF8&ll=42.362682,-71.093495&spn=0.008419,0.01575&z=16&iwloc=addr">32 Vassar St., Cambridge, MA 02139</a>, <a href="callto://+1-617-253-0969">(617) 253-0969</a>' ); + item( 'Office', 'MIT/CSAIL <a href="http://whereis.mit.edu/map-jpg?selection=32&Buildings=go">32</a>-<a href="http://www.csail.mit.edu/resources/maps/9G/G980.gif">G980</a>, <a href="http://www.eecs.mit.edu/stata-link.html">Stata Center</a>, <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=32+Vassar+St,+Cambridge,+MA+02139&sll=42.357926,-71.093616&sspn=0.00842,0.01575&ie=UTF8&ll=42.362682,-71.093495&spn=0.008419,0.01575&z=16&iwloc=addr">32 Vassar St., Cambridge, MA 02139</a>, <a href="callto://+1-617-253-0969">(617) 253-0969</a>' ); item( 'GPG public key', '<a href="yang.gpg.asc">yang.gpg.asc</a> (<a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB1E65B60">MIT PKS entry</a>)' ); document.write( '</ul>' ); // ]]> @@ -56,8 +56,9 @@ Here are the non-confidential projects in which I've been involved. More details when I have time! -<!-- JOSMP: an exokernel for multi-core x86 systems --> - +- JOSMP: an exokernel operating system for many-core systems. +- [H-Store]: a distributed main-memory relational database management system + for on-line transaction processing workloads. - [WebTables]: web-scale information retrieval over structured data. - [Scalable Resilient Overlay Networks]: distributed algorithms and systems to enable RONs to scale to thousands of nodes. @@ -92,6 +93,7 @@ <!-- TODO upload --> +[H-Store]: http://db.cs.yale.edu/hstore/ [WebTables]: slides/webtables-presentation-google07.pdf [Scalable Resilient Overlay Networks]: http://nms.csail.mit.edu/ron/ @@ -124,9 +126,12 @@ - [Assorted Projects]: my code dump - [Simple Publications Manager]: publication management web application +- [gbookmark2delicious]: Python script to migrate/sync Google Bookmarks to + del.icio.us [Assorted Projects]: http://assorted.sf.net/ [Simple Publications Manager]: http://pubmgr.sf.net/ +[gbookmark2delicious]: http://gbookmark2delicious.googlecode.com/ <a name="papers" /> @@ -143,10 +148,8 @@ - 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) - [Slides PDF](icedb-presentation-icde07.pdf) + [Slides PPTX](slides/icedb-presentation-icde07.pptx) -<!-- TODO upload above --> - - 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. @@ -177,20 +180,15 @@ - 6.033 Computer Systems Engineering (TA, spring 2007) - 6.867 Machine Learning (fall 2007) +<a name="stuff" /> + Stuff ----- +- [Links](links.html) - [Software recommendations](recommendations.html) +<!-- - [Notes](notes/) --> -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/) - <!-- Extreme Tracking --> <div id="eXTReMe"><a href="http://extremetracking.com/open?login=yzzororg"> <img src="http://t1.extreme-dm.com/i.gif" style="border: 0;" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:19:19
|
Revision: 736 http://assorted.svn.sourceforge.net/assorted/?rev=736&view=rev Author: yangzhang Date: 2008-05-08 12:19:08 -0700 (Thu, 08 May 2008) Log Message: ----------- updates to software recommendations Modified Paths: -------------- personal-site/trunk/src/recommendations.txt Modified: personal-site/trunk/src/recommendations.txt =================================================================== --- personal-site/trunk/src/recommendations.txt 2008-05-08 19:18:39 UTC (rev 735) +++ personal-site/trunk/src/recommendations.txt 2008-05-08 19:19:08 UTC (rev 736) @@ -1,22 +1,27 @@ +% Software Recommendations +% Yang Zhang + +<!-- Software recommendations ------------------------- +--> Some underdogs that more people should know about. -- [toast]: Automated software retrieval, compilation, installation, and removal - with safe compartmentalization and non-root usage. Works without hassle 90% - of the time. Supports a variety of package types, including autotools, plain - prefix-dir, plain make, [distutils], [Cabal], and more. +- __[toast]__: Automated software retrieval, compilation, installation, and + removal with safe compartmentalization and non-root usage. Works without + hassle 90% of the time. Supports a variety of package types, including + autotools, plain prefix-dir, plain make, [distutils], [Cabal], and more. [toast]: http://toastball.net/toast/ [Cabal]: http://www.haskell.org/cabal/ [distutils]: http://docs.python.org/lib/module-distutils.html -- [pandoc]: [Markdown] done right. A sane markup (structured text) language - supporting a variety of input and output formats, including HTML, man, and - TeX. [AsciiDoc] is a close runner-up; [ReST] is more complex. Hopefully the - future will yield markup languages with greater extensibility and enough - flexibility to be used in everything from [wikis] to comment documentation. +- __[pandoc]__: [Markdown] done right. A sane markup (structured text) + language supporting a variety of input and output formats, including HTML, + man, and TeX. [AsciiDoc] is a close runner-up; [ReST] is more complex. + Pandoc includes support for both of these. Hopefully the future will yield + markup languages with greater extensibility and enough flexibility to be used + in everything from [wikis] to comment documentation. [AsciiDoc]: http://www.methods.co.nz/asciidoc/ [Markdown]: http://daringfireball.net/projects/markdown/ @@ -24,7 +29,7 @@ [pandoc]: http://johnmacfarlane.net/pandoc/ [wikis]: http://code.google.com/p/pandocwiki/ -- [rubber]: A usable frontend for LaTeX and all its friends: BibTeX, image +- __[rubber]__: A usable frontend for LaTeX and all its friends: BibTeX, image converters, etc. Similar to but more modular than [latexmk]. [rubber]: http://www.pps.jussieu.fr/~beffara/soft/rubber/ @@ -32,7 +37,8 @@ <!-- TODO ensure the following is formatted correctly. --> -- [Gobby]: A collaborative text editor. Examples of things I've used it for: +- __[Gobby]__: A collaborative text editor. Examples of things I've used it + for: - peer programming - whiteboard - online meetings (everybody ends up communicating exclusively in the @@ -46,25 +52,32 @@ [Gobby]: http://gobby.0x539.de/trac/ [screen]: http://www.gnu.org/software/screen/ -- [Opera]: The fastest, smallest browser I've used is also the most usable and - comes with the most features out of the box. Its M2 mail client is awesome - too, but alas, it's too buggy. [KHTML] is probably the closest-performing - engine, but I've found it to be too crash-prone. +- __[Opera]__: The fastest, smallest browser I've used is also the most usable + and comes with the most features out of the box. Its M2 mail client is + awesome too, but alas, it's too buggy. [KHTML] is probably the + closest-performing engine, but I've found it to be too crash-prone. [Opera]: http://www.opera.com/ [KHTML]: http://en.wikipedia.org/wiki/KHTML -- [gprof2dot]: A handy tool for visualizing the callgraph results of gprof, the - Google CPU profiler, python cProfile, and more. +- __[gprof2dot]__: A handy tool for visualizing the callgraph results of gprof, + the Google CPU profiler, python cProfile, and more. [gprof2dot]: http://code.google.com/p/jrfonseca/wiki/Gprof2Dot -- [wtf]: A filter for `g++`'s obscure page-long template errors. Resulting +- __[wtf]__: A filter for `g++`'s obscure page-long template errors. Resulting error messages are readable and beautified. See also [gstlfilt]. [wtf]: http://nmstl.sourceforge.net/doc/nmstl-guide.html [gstlfilt]: http://www.bdsoft.com/tools/stlfilt.html <!-- +Preferred Applications + +- web browser: [Opera] +- mail client: [Thunderbird] +--> + +<!-- vim:ft=mkd:et:sw=2:ts=2:nocin --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:18:57
|
Revision: 735 http://assorted.svn.sourceforge.net/assorted/?rev=735&view=rev Author: yangzhang Date: 2008-05-08 12:18:39 -0700 (Thu, 08 May 2008) Log Message: ----------- added links.txt Added Paths: ----------- personal-site/trunk/src/links.txt Added: personal-site/trunk/src/links.txt =================================================================== --- personal-site/trunk/src/links.txt (rev 0) +++ personal-site/trunk/src/links.txt 2008-05-08 19:18:39 UTC (rev 735) @@ -0,0 +1,106 @@ +% Links +% Yang Zhang + +Myself Elsewhere +---------------- + +- [Blog](http://scripts.mit.edu/~y_z/wp/) +- [Bookmarks]: Mirrors my Google Bookmarks using [gbookmark2delicious]. I post + articles, software/tools, research projects, homepages, and just about + anything else noteworthy that I come across. +- [Google Reader Shared Items]: I try to keep this restricted to posts that are + technical in nature, with a heavy emphasis on software systems in computer + science. +- [All my feed subscriptions] ([RSS]): All my Google Reader subscriptions, + merged via Yahoo Pipes. Like my shared items, this is still mostly technical + content. +- [Facebook](http://www.facebook.com/profile.php?id=708869) +- [LinkedIn](http://www.linkedin.com/in/yzhang) + +[Bookmarks]: http://del.icio.us/yaaang/ +[gbookmark2delicious]: http://gbookmark2delicious.googlecode.com/ +[Google Reader Shared Items]: https://www.google.com/reader/shared/18352898346631652002 +[All my feed subscriptions]: http://pipes.yahoo.com/pipes/pipe.info?_id=0tn5f2MV3RGk8DsIYEsBXw +[RSS]: http://pipes.yahoo.com/pipes/pipe.run?_id=0tn5f2MV3RGk8DsIYEsBXw&_render=rss + +Selected Blogroll +----------------- + +- [A Neighborhood of Infinity]: Lightweight theoretical topics on everything + from category and type theory to quantum computing. Occasional Literate + Haskell posts. Low frequency. +- [All Things Distributed]: Werner Vogels' blog (Amazon CTO and former CMU + prof). Focus on distributed systems. Low frequency. +- [Ars Technica]: Jon "Hannibal" Stokes' pieces great explanatory articles on + architecture topics. Low frequency. +- [Evan Jones' Scratch Pad]: Labmate's blog on systems topics with occasional + low-level articles on programming. Low frequency. +- [High Scalability]: Blog on systems and scalability, particularly in the web + applications/datacenter universe. The author frequently provides useful + summarizing notes. Medium frequency. +- [Kernel Trap]: Digests of notable developments on the [Linux kernel mailing + list]. Low frequency. +- [Lambda The Ultimate]: A discussion forum on programming languages, with a + heavy emphasis on "PL design." The rabbit hole is deep, so about half their + stories/forum topics end up interesting (accessible to) me. Medium frequency. +- [Linux Weekly News]: Jonathan Corbet writes good explanatory articles in the + Weekly Edition. +- [The Monad Reader]: The Haskell magazine. "It is less formal than journal, + but somehow more enduring than a wiki-page." An issue every few months. +- [p2p-hackers]: Discussion forum on anything related to networking and + distributed systems, with no shortage of discussion on research in these + fields. Medium frequency. +- [PBF Comics]: Sick, twisted humor. Now on hiatus, sadly. +- [research!rsc]: Labmate Russ Cox's blog. Lots of focus on history of + computing. Low frequency. + +[A Neighborhood of Infinity]: http://sigfpe.blogspot.com/ +[All Things Distributed]: http://www.allthingsdistributed.com/ +[Ars Technica]: http://arstechnica.com/index.ars +[Evan Jones' Scratch Pad]: http://evanjones.ca/ +[High Scalability]: http://www.highscalability.com/ +[Kernel Trap]: http://kerneltrap.org/ +[Linux kernel mailing list]: http://lkml.org/ +[Lambda The Ultimate]: http://www.lambda-the-ultimate.org/ +[Linux Weekly News]: http://www.lwn.net/ +[The Monad Reader]: http://www.haskell.org/haskellwiki/The_Monad.Reader +[p2p-hackers]: http://lists.zooko.com/mailman/listinfo/p2p-hackers +[PBF Comics]: http://www.pbfcomics.com/ +[research!rsc]: http://research.swtch.com/ + +Favorite Conferences +-------------------- + +- Systems + - [ASPLOS](http://www.acm.org/pubs/contents/proceedings/series/asplos/) + - [OSDI](http://www.usenix.org/event/byname/osdi.html) + - [SOSP](http://www.sosp.org/) + - [USENIX](http://www.usenix.org/event/byname/usenix.html) +- Networking + - [SIGCOMM](http://www.sigcomm.org/) + - [NSDI](http://www.usenix.org/event/byname/nsdi.html) +- Programming languages + - [ICFP](http://www.icfpconference.org/) + - [OOPSLA](http://www.oopsla.org/) + - [PLDI](http://www.sigplan.org/pldi.htm) + - [POPL](http://www.sigplan.org/popl.htm) +- Graphics + - [SIGGRAPH](http://www.siggraph.org/) + +Frequently Visited +------------------ + +- [Campusfood](http://campusfood.com/) +- [Google Calendar](http://calendar.google.com/) +- [Google Reader](http://reader.google.com/) +- [Remember the Milk](http://rememberthemilk.com/) +- [Songza](http://songza.com/) + +Podcasts and Videos +------------------- + +- [Going Deep](http://channel9.msdn.com/shows/Going_Deep) +- [Google Channel on Youtube](http://www.youtube.com/user/Google) +- [MSR Videos on + ResearchChannel](http://www.researchchannel.org/prog/displayinst.aspx?fID=880) +- [Software Engineering Radio](http://se-radio.net/) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:18:30
|
Revision: 734 http://assorted.svn.sourceforge.net/assorted/?rev=734&view=rev Author: yangzhang Date: 2008-05-08 12:18:19 -0700 (Thu, 08 May 2008) Log Message: ----------- tidied up the footer; added project honeypot links Modified Paths: -------------- personal-site/trunk/src/footer.html Modified: personal-site/trunk/src/footer.html =================================================================== --- personal-site/trunk/src/footer.html 2008-05-08 19:17:30 UTC (rev 733) +++ personal-site/trunk/src/footer.html 2008-05-08 19:18:19 UTC (rev 734) @@ -1,3 +1,4 @@ +<!-- Footer links --> <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> @@ -3,12 +4,15 @@ <p>Valid CSS (<a href="http://jigsaw.w3.org/css-validator/check/referer">re-validate</a>)</p> </div> -<div id="spamlink" style="position: absolute; top: -250px; left: -250px;"><a href="http://people.csail.mit.edu/yang/appraisal.php">pattern</a></div> + +<!-- Project Honeypot --> +<div id="spamlink" style="position: absolute; top: -250px; left: -250px;"> + <a href="http://people.csail.mit.edu/yang/appraisal.php">pattern</a> +</div> <!-- <style>a.pudris{color:#FFF;font:bold 10px arial,sans-serif;text-decoration:none;}</style><table cellspacing="0"cellpadding="0"border="0"style="background:#999;width:230px;"><tr><td valign="top"style="padding: 1px 2px 5px 4px;border-right:solid 1px #CCC;"><span style="font:bold 30px arial,sans-serif;color:#666;top:0px;position:relative;">@</span></td><td valign="top" align="left" style="padding:3px 0 0 4px;"><a href="http://www.projecthoneypot.org/" class="pudris">MEMBER OF PROJECT HONEY POT</a><br/><a href="http://www.unspam.com"class="pudris">Spam Harvester Protection Network<br/>provided by Unspam</a></td></tr></table> --> <!-- Google Analytics --> -<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> -</script> +<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"/> <script type="text/javascript"> _uacct = "UA-1322324-1"; @@ -21,10 +25,10 @@ <noscript><p><img alt="Performancing Metrics" src="http://pmetrics.performancing.com/102ns.gif" /></p></noscript> <!-- Quantcast --> -<!-- Start Quantcast tag --> <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script> <script type="text/javascript"> -_qacct="p-45nKPbm9DJOeE";quantserve();</script> + _qacct="p-45nKPbm9DJOeE";quantserve(); +</script> <noscript> -<img src="http://pixel.quantserve.com/pixel/p-45nKPbm9DJOeE.gif" style="display: none" height="1" width="1" alt="Quantcast"/></noscript> -<!-- End Quantcast tag --> + <img src="http://pixel.quantserve.com/pixel/p-45nKPbm9DJOeE.gif" style="display: none" height="1" width="1" alt="Quantcast"/> +</noscript> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:17:36
|
Revision: 733 http://assorted.svn.sourceforge.net/assorted/?rev=733&view=rev Author: yangzhang Date: 2008-05-08 12:17:30 -0700 (Thu, 08 May 2008) Log Message: ----------- fixed homepage and download url Modified Paths: -------------- python-afx/trunk/setup.py Modified: python-afx/trunk/setup.py =================================================================== --- python-afx/trunk/setup.py 2008-05-08 19:17:15 UTC (rev 732) +++ python-afx/trunk/setup.py 2008-05-08 19:17:30 UTC (rev 733) @@ -10,8 +10,8 @@ Version: 0.1 Author: Yang Zhang Author-email: yaaang NOSPAM at REMOVECAPS gmail -Home-page: http://assorted.sourceforge.net/python-afx -Download-url: http://assorted.sourceforge.net/python-afx/download +Home-page: http://assorted.sourceforge.net/python-afx/ +Download-url: http://pypi.python.org/pypi/python-commons/ Summary: Python AFX License: Python Software Foundation License Description: Utilities and extensions to the AF asynchronous IO library. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:17:19
|
Revision: 732 http://assorted.svn.sourceforge.net/assorted/?rev=732&view=rev Author: yangzhang Date: 2008-05-08 12:17:15 -0700 (Thu, 08 May 2008) Log Message: ----------- quick update Modified Paths: -------------- numa-bench/trunk/doc/analysis.txt Modified: numa-bench/trunk/doc/analysis.txt =================================================================== --- numa-bench/trunk/doc/analysis.txt 2008-05-08 19:17:00 UTC (rev 731) +++ numa-bench/trunk/doc/analysis.txt 2008-05-08 19:17:15 UTC (rev 732) @@ -3,6 +3,7 @@ __Updates__ +- 3/5/08: updated scalability experiments; added lessons learned - 3/4/08: updated scalability experiments All tests were performed on `josmp.csail.mit.edu`. The [graphs](graphs) show This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:17:15
|
Revision: 731 http://assorted.svn.sourceforge.net/assorted/?rev=731&view=rev Author: yangzhang Date: 2008-05-08 12:17:00 -0700 (Thu, 08 May 2008) Log Message: ----------- added an overview of assorted.bash; fixed header issues Modified Paths: -------------- shell-tools/trunk/README Modified: shell-tools/trunk/README =================================================================== --- shell-tools/trunk/README 2008-05-08 19:16:37 UTC (rev 730) +++ shell-tools/trunk/README 2008-05-08 19:17:00 UTC (rev 731) @@ -110,12 +110,12 @@ Here are a few of the major components in `shell-tools`. -== common.bash == +### common.bash Library of various general-purpose utilities that can come in handy for shell scripting. -== SimpleSetup == +### SimpleSetup Framework for writing minimal installers that support installation by symlinks, which is particularly handy for development of scripts (scripts because it's @@ -123,6 +123,18 @@ [build system]: http://assorted.sf.net/simple-build/ +### assorted.bash + +This is a script for helping me publish, in the hopes of getting more into the +whole "release early and often" mantra. It takes care of the generation of the +project website and publishing this to assorted.sf.net, and it also packages up +and releases the software package. + +In both website generation and packaging, the process involves generation of a +final README from the source README. For releasing a package, the place to +upload the files is determined by the package type (most things default to +Google Code, but Python packages are pushed to PyPI, for instance). + Links ----- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:16:54
|
Revision: 730 http://assorted.svn.sourceforge.net/assorted/?rev=730&view=rev Author: yangzhang Date: 2008-05-08 12:16:37 -0700 (Thu, 08 May 2008) Log Message: ----------- added quick date insertion; fixed vimdiff colors Modified Paths: -------------- configs/trunk/src/vim/plugin/_yang.vim Modified: configs/trunk/src/vim/plugin/_yang.vim =================================================================== --- configs/trunk/src/vim/plugin/_yang.vim 2008-05-08 19:06:11 UTC (rev 729) +++ configs/trunk/src/vim/plugin/_yang.vim 2008-05-08 19:16:37 UTC (rev 730) @@ -25,11 +25,36 @@ map <space> <c-f> map <s-space> <c-b> +imap <f6> <c-o>=system("date")[0:-2]<cr> +" imap <f6> <c-r>=strftime("%d/%m/%Y %H:%M:%S")<cr> +function ProjectDir() + let dir = expand('%:h') + if (dir =~ "^$") + let dir = getcwd() + endif + while isdirectory(dir) && + \dir !~ '^/*$' && + \glob(dir . "/.project.vim") !~ "^$" + let dir = fnamemodify(dir, ":h") + endwhile + if glob(dir . "/.project.vim") =~ "^$" + let dir = getcwd() + endif + return dir +endfunction + +" XXX Why doesn't this work the first time if I directly load a file from the command line, eg "vim foo.cc"? +" XXX This is highly insecure; should only allow the same things allowed in modelines. +autocmd BufNewFile,BufRead * if glob(ProjectDir() . "/.project.vim") !~ "^$" | execute "source " . ProjectDir() . "/.project.vim" | endif + + + + imap ^D <ESC>`[ @@ -159,7 +184,8 @@ " autocmd Mapserver map files au BufNewFile,BufRead *.map setf map " temporaries -autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 +autocmd BufNewFile,BufRead *.{lzz,tt,tcc} setlocal filetype=cpp +autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h,lzz,tt,tcc} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 autocmd BufNewFile,BufRead *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 " autocmd GDB au BufNewFile,BufRead *.gdb set ft=gdb @@ -365,28 +391,9 @@ ""au BufRead *.lhs compiler ghci " hugs filetype plugin indent on -function ProjectDir() - let dir = expand('%') - if (dir =~ "^$") - let dir = getcwd() - endif - while isdirectory(dir) && - \ dir !~ '^/*$' && - \glob(dir . "/configure*") =~ "^$" - let dir = fnamemodify(dir, ":h") - endwhile - if glob(dir . "/configure*") =~ "^$" - let dir = getcwd() - endif - return dir -endfunction +highlight DiffAdd ctermbg=4 ctermfg=gray +highlight DiffChange ctermbg=5 +highlight DiffDelete cterm=bold ctermbg=6 ctermfg=gray +highlight DiffText cterm=bold ctermbg=1 -" ctags handling -let tag_path = ProjectDir() . "/tags" -let &tags = &tags . "," . tag_path -autocmd BufWritePost * - \ if exists("b:is_source") && b:is_source | - \ silent! exe "!ctags -f ".tag_path." -a ".expand("%") | - \ endif - " 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-05-08 19:06:23
|
Revision: 729 http://assorted.svn.sourceforge.net/assorted/?rev=729&view=rev Author: yangzhang Date: 2008-05-08 12:06:11 -0700 (Thu, 08 May 2008) Log Message: ----------- added versions to dependencies Modified Paths: -------------- mailing-list-filter/trunk/README Modified: mailing-list-filter/trunk/README =================================================================== --- mailing-list-filter/trunk/README 2008-05-08 19:05:50 UTC (rev 728) +++ mailing-list-filter/trunk/README 2008-05-08 19:06:11 UTC (rev 729) @@ -38,9 +38,9 @@ Requirements: -- [argparse](http://argparse.python-hosting.com/) +- [argparse](http://argparse.python-hosting.com/) 0.8.0 - [Python Commons](http://assorted.sf.net/python-commons/) 0.4 -- [path](http://www.jorendorff.com/articles/python/path/) +- [path](http://www.jorendorff.com/articles/python/path/) 2.2 Install the program using the standard `setup.py` program. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-05-08 19:05:43
|
Revision: 728 http://assorted.svn.sourceforge.net/assorted/?rev=728&view=rev Author: yangzhang Date: 2008-05-08 12:05:50 -0700 (Thu, 08 May 2008) Log Message: ----------- refined some readme text Modified Paths: -------------- java-reactor/trunk/README Modified: java-reactor/trunk/README =================================================================== --- java-reactor/trunk/README 2008-05-08 08:36:43 UTC (rev 727) +++ java-reactor/trunk/README 2008-05-08 19:05:50 UTC (rev 728) @@ -6,9 +6,9 @@ This is a completely minimal implementation of a select-based reactor framework for event-based asynchronous IO programming. The reactor core supports scheduling of tasks (a la Twisted, asio, etc.). This was written for the -constrained-resource environment that is PlanetLab. It also helped us remove -the need for a separate thread for the scheduled executor tasks - these are run -in-line (using timeouts to select). +constrained-resource environment that is PlanetLab, mostly out of performance +paranoia. It also helped us remove the need for a separate thread for the +scheduled executor tasks - these are run in-line (using timeouts to select). Aside from its simplicity, efficiency, and support for scheduled tasks, it also has no dependencies except for Java 6. Currently only UDP is supported. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |