Re: D Programming Language source (dmd, phobos, etc.) has moved to github

2011-01-25 Thread Ulrik Mikaelsson
 That's the same exact concept, isn't it? My understanding is that a clone of
 a DVCS repository *is* a distinct DVCS repository. So, yea, like I said, you
 have to specify which repository. The common dev repository. The main
 stable repository. The only shared repository this small project actually
 has. Or Bob's repository for what little that would be worth.
Mostly a side-note, but in many DVCS:es (git in particular, but both
bzr and hg has it too), history rewriting is allowed, even encouraged
under some particular circumstances. In that case, the SHA-1 revision
will CERTAINLY change, while even repo+number is not very reliable.
Some kernel-branches are maintained like that, for example.

Furthermore, a related hg-anecdote; Personally, for my work-flow I
often use history-rewriting to jump around, amending patches, rebasing
them before pushing, etc. I've become very accustomed to it, and find
it extremely useful. When trying out hg a while back (to make patches
for LDC IIRC), the attempted linear-history was actually one of my
biggest disappointments. I quickly ended up in a situation where all
my patches looked like a zig-zag-stacked hodgepodge of stuff, many of
them not intended to even keep in the repo. When reading the docs
about it, the only useful suggestion I found was to create a new repo,
and cherry-pick what I wanted from the old. It's possible this were
mostly due to my inexperience with Hg, but it strengthened my
conviction that the unrealistic linear-numbers of a non-linear history
are really just shoe-horning in something for newbie-comfort, but
quite off as a model. For me, It is the deal-breaker for hg.

 I don't understand why you think I'm claiming anything of the sort. I never
 said anything like that. I keep saying over and over and over and over and
 over and over and over.changeset number **PLUS WHICH REPOSITORY (and
 maybe branch, depending how the given system chooses to work)**
How should you linearly number the two chains A  B  C and A  D  C
? Is it A, B, D, C or A, D, B, C? Should they be inter-vowen by
commit-time, or what?

 Additionally, Hg's approach provides a trivial way to disambiguate hash
 collisions. I know that Git book brushes it off as very rare, but it's
 not
 as if nobody's ever going to run into it.
 Um, what method is that?
 Version number together with being specific about which repository.
Again, version-number + repo is not 100% when history-rewrite is possible.

 Also, saying that SHA-1 hash collisions are very  rare is a bit of an
 understatement.
 Point is, it's possible and it's going to happen at least to someone, and
 frankly, such things *have* happened. Winning the lottery and getting hit by
 lighting are *extremely* rare, and yet there are a *lot* of people who have
 had it happen. The problem is they're taking rare (doesn't matter what
 superlative is used) and pretending it's the same as impossible. Airplane
 crashes and major earthquakes are extremely rare, but they sure as hell plan
 for what happens should such an event occur.
Getting hit by lightning isn't really on the same scale as SHA-1 collisions.

According to Wolfram Alpha, the odds of being struck by lightning in a
given year is one in 75. If I've understood things roughly right,
(probabilities aren't my strong side) the best possible attack for
SHA-1 requires 2^52 attempts (Note: intentional attack, pure random
chance is likely MUCH higher). That means that, given a very big
project of 1 million commits (2^20, by comparison Linux is at 232k
atm), the chance of intentionally hitting a collision is 1 in 2^32 =
4billion.

Suffice to say, comparatively there might be a prospering market for
current-insulating clothing.

I guess, when every household on earth are running it's own
kernel-project, git might have to upgrade to SHA-512. (Hg too, btw. I
think the REAL, internal revision-id:s for HG is sha-1 too, aren't
they?)


BitHorde public beta released

2010-10-06 Thread Ulrik Mikaelsson
BitHorde is a new content distribution system developed in D/Tango.

The main concept of BitHorde is one of a F2F-routing network with
caches in each node, caching popular content to increase availability
and throughput. BitHorde separates Content from Metadata, handling
only content, identified by hash, and doesn't care about metadata
(including filenames).

BitHorde features;
 * Efficent system-daemon. Doesn't use more RAM and CPU than necessary
and tries to stay out of your way.
 * FUSE-filesystem access to let any application immediately access content
 * Multiple checksum-generation to be able to identify assets from
multiple schemes (currently sha1, tree:tiger and ed2k).
 * ... More to come

BitHorde can have many possible practical applications including;
 * Optimized CDN solutions, for streaming delivery of heavy assets,
for example Video On Demand
 * File-Sharing
 * Keeping your home-media-collection partially available on the go.
Popular assets are stored in the cache on the laptop-harddrive, while
all content is available when internet connection is available.
 * Digital Asset distributions in Online Multiplayer games

Short demo video: http://vimeo.com/10676999 (Old version and poor
narration, sorry about that.)
Website: http://www.bithorde.org
Source code: http://github.com/rawler/bithorde
Ubuntu PPA for convenience: https://launchpad.net/~rawler/+archive/bithorde
Jabber Multiuser Conference: bitho...@jabber.org

Note the version-number 0.1-beta1. The system is functional, but not
all planned features are available and your mileage may vary.

There's a demo-node on bithorde.org:1337, featuring the video Sintel.
After getting bithorde and bhfuse up and running, try checking out
videoplayer of choice 'bhfuse
mountpoint/magnet:?xt=urn:tree:tiger:H5WMLKREL2KPAZEZRBPRP6HDRZX6MBEULGH3W2A'.
(Assumes an internet connection capable of 8mbit+ throughput to the
host located in Sweden, or you will have to pre-cache the asset.)

All testers, coders, documentation-gurus or otherwise interested is welcome.
/ Ulrik