WIP
[?]
Dec 6, 2014, 4:36 AM
LAROLAYUGJ4Q5AEFV5EJMIA2ZKBNCBWHHHPCJ3CKCNIUIYUKRFVQCDependencies
- [2]
5W5M56VJMove library code to 'lib' - [3]
EMVTF2IWWIP moving back to snap. - [4]
Z3M53KTLAdrift. - [5]
ADMKQQGCInitial empty Snap project. - [6]
RSEB2NFGReplacing Snap with Scotty. - [7]
64VI73NPServer now compiles using abstracted SQLite - [8]
WZUHEZSBStart of migration back toward snap. - [9]
NTPC7KJETrivial changes, feature scratchpad. - [10]
64C6AWH6Rename Ananke -> Quixotic, project reboot. - [*]
AXKKXBWNInitial attempt at writing down my ideas for a company based on trust.
Change contents
- file addition: README.md[12.2]
The 3-minute Tour=================A quixotic company is a group of independent actors who distribute revenueamong themselves according to the amount of time they've each spentcontributing to a project. As soon as any revenue is received, it isimmediately paid out to the contributors in proportion to their contributions.In a sense, the hours contributed to the project form the "shares" of thecompany, with a caveat as will be described below.Any hour logged is equivalent to any other hour logged that ends at the samemoment; this produces a situation where the value of each individual's life isconsidered to be equal, at the outset. However, it is acceptable for onecontributor to explicitly "work for" another, by either donating some of theirshare of revenue to their collaborators, or by allocating time that they haveworked to another's account. In this way, a market for talent can evolve withina company; however, all such actions are public, and at the sole discretion ofthe individuals making them.The caveat: for numerous philosophical and practical reasons, the value of anhour contributed is not constant. Instead, the value of an hour decaysaccording to a tunable function of time elapsed since the hour was logged. Forexample, after 6 months from the time of the original contribution, an hourcontributed begins to decay at a rate of 2 minutes per month, such that after 5years, the value of the hour has been completely exhausted, and when revenue isdistributed, that hour will no longer be compensated. Of course, hour-shares ofthe company are also subject to constant inflation as more contributions arecontinuously being made.If the company needs to rent a shared resource, the money needed to pay forthat resource may be raised from the contributors, or from others, byauctioning hours of time that are then logged to the accounts of thepurchasers. It is not recommended that the company, as an entity, own anything;ownership is a privilege reserved individuals.There is, of course, nothing preventing a subset of collaborators from makingan external agreement for shared ownership of a resource that is then rented tothe company; however, the particulars of such agreements are outside the scopeof the quixotic company structure.What Is a Quixotic Company?===========================The idea of the quixotic company arose out of my experience in the open-sourcecommunity. Something we have learned from the past couple of decades ofexperimentation with open-source projects is that a group of motivatedindividuals, working in their own individual interest in a framework ofcollaboration and trust, can achieve amazing things.The modern corporation is essentially feudal in structure; a hierarchy of lordsto whom the greatest benefits accrue, lieutenants who provide command andcontrol, and serfs, whose labor fuels the enterprise but who may never achievethe level of financial independence of the upper classes. The lore of modernbusiness is that those at the top of these hierarchies are justly compensatedfor providing the greatest contribution or taking the most significant risksbut I believe this justification is contrived to mitigate the naturaldissatisfaction that people feel when confronted with inequality; the simplefact is that hierarchical structures are relatively stable. However, as theopen-source software development world has shown us, this sort of hierarchyis not the only kind of organization that can create great things.Open-source development, however, has a couple of problems. While it's truethat a great deal of open-source work is paid for by conventional corporations,it is actually remarkably difficult to make a living as an independentcontributor to an open-source project. The quixotic company is intended toprovide the minimal structure that is needed for a group of individuals tocollaborate on a project for which they hope to be paid.The Value of Time=================What is the value of an hour of your life? This is a question that I've spentyears wrestling with while trying to balance time spent with my family andfriends, time spent working, and time alone with my thoughts. In my consultinglife I've assigned monetary value to my hours somewhat arbitrarily; I determinean hour to be worth enough to maintain a certain lifestyle and yet not be so muchthat nobody will be willing to pay it. Yet, the question has always remained withme: what is the actual value, in terms of revenue, of the effort of the hours thatI've put in?A related question is, how does the value of my time genuinely compare to thevalue of the time of others? The premise that an hour of my life is somehow moreor less valuable than an hour of someone else's seems a little problematic;we don't know how long we'll live. What is your last hour worth, or your first?The only answer that I can come up with is this. We should begin with an idea of equality.Resources=========Tithes======Investment========== - edit in TASKS at line 5
* Evaluate transition back to Snap - file addition: Auction.hs[2.18]
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, NoImplicitPrelude #-}module Quixotic.Auction whereimport ClassyPreludenewtype AuctionId = AuctionId Intdata Auction = Auction{ raiseAmount :: BTC, endsAt :: UTCTime}data Bid = Bid{ userId :: UserId, hours :: Hours, btcAmount :: BTC}winningBids :: Foldable f -> Auction -> f Bid -> [Bid]winningBids =let - edit in lib/Quixotic/Database.hs at line 8
import Quixotic.Auctionimport Quixotic.Users - replacement in lib/Quixotic/Database.hs at line 14
{ recordEvent :: a -> LogEntry -> m (), readWorkIndex :: a -> EitherT T.Text m WorkIndex{ recordEvent :: LogEntry -> ReaderT a m (), readWorkIndex :: EitherT T.Text (ReaderT a m) WorkIndex, newAuction :: Auction -> ReaderT a m AuctionId, readAuction :: AuctionId -> ReaderT a m Auction, recordBid :: UTCTime -> Bid -> ReaderT a m (), readBids :: AuctionId -> ReaderT a m [(UTCTime, Bid)], createUser :: User -> ReaderT a m UserId - file addition: Users.hs[2.18]
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, NoImplicitPrelude #-}module Quixotic.Users whereimport ClassyPreludenewtype UserId = UserId Intdata User = User{ userAddress :: BtcAddr, userEmail :: Text} - replacement in quixotic.cabal at line 25
, classy-prelude >= 0.10.2, classy-prelude >= 0.10.1 - replacement in server/Main.hs at line 28
db <- openConnection $ dbName cfgdb <- openConnection $ dbName cfg - replacement in server/Main.hs at line 30
quickHttpServe $ site cfgquickHttpServe $ runReaderT (site adb) db - replacement in server/Main.hs at line 32
site :: QConfig -> a -> ADB IO a -> Snap ()site cfg db adb =route [ ("logStart/:btcAddr", handleLogRequest db adb StartWork), ("logEnd/:btcAddr", handleLogRequest db adb StopWork), ("payouts", currentPayouts db adb)]site :: ADB IO a -> ReaderT a Snap ()site adb = route[ ("logStart/:btcAddr", handleLogRequest adb StartWork), ("logEnd/:btcAddr", handleLogRequest adb StopWork), ("payouts", currentPayouts adb)] - replacement in server/Main.hs at line 49
handleLogRequest :: a -> ADB IO a -> (UTCTime -> WorkEvent) -> Snap ()handleLogRequest :: ADB IO a -> (UTCTime -> WorkEvent) -> ReaderT a Snap () - replacement in server/Main.hs at line 51
addrBytes <- getParam "btcAddr"addrBytes <- lift $ getParam "btcAddr" - replacement in server/Main.hs at line 56
currentPayouts :: a -> ADB IO a -> Snap ()currentPayouts :: ADB IO a -> ReaderT a Snap () - replacement in server/Main.hs at line 67
eitherT (raise . LT.fromStrict) buildPayoutsResponse payoutsActionlift $ eitherT (raise . LT.fromStrict) buildPayoutsResponse payoutsAction