1 2011-12-11 00:11:59 <CIA-100> libbitcoin: genjix * r611951e14023 / (10 files in 6 dirs): Allow child channel to outlive parent network object. We do this by creating a shared 'thread_core' that is passed between instances. Exclusion function sets (strand) use this thread_core as a factory. http://tinyurl.com/7rj7ecq
2 2011-12-11 00:21:03 <nanotube> ;;op
3 2011-12-11 00:21:51 <devrandom> /quit/quit
4 2011-12-11 00:21:54 <CIA-100> libbitcoin: genjix * re134a6dded2b / (10 files in 6 dirs): bdb_blockchain fetch_block_locator http://tinyurl.com/7jo7ocj
5 2011-12-11 00:39:28 <[Tycho]> Hello, devs.
6 2011-12-11 00:47:09 <rjk2> howdy [Tycho]
7 2011-12-11 00:52:35 <BlueMatt> guess no devs are online...or they are all too busy deving to talk :)
8 2011-12-11 01:15:06 <copumpkin> I'm implementing typesafe currencies
9 2011-12-11 01:28:30 <doublec> copumpkin: what in?
10 2011-12-11 01:28:35 <copumpkin> doublec: guess ;)
11 2011-12-11 01:28:42 <doublec> copumpkin: agda :)
12 2011-12-11 01:28:48 <copumpkin> nah, just haskell
13 2011-12-11 01:28:54 <copumpkin> with lots of superfluous types
14 2011-12-11 01:29:02 <doublec> nifty
15 2011-12-11 01:29:02 <sipa> purecoin?
16 2011-12-11 01:29:19 <copumpkin> nah, it's my mtgox client
17 2011-12-11 01:29:23 <BlueMatt> heh
18 2011-12-11 01:29:28 <sipa> haha
19 2011-12-11 01:29:39 <doublec> your client will be safer than their website
20 2011-12-11 01:29:44 <BlueMatt> ouch
21 2011-12-11 01:29:46 <copumpkin> possibly :)
22 2011-12-11 01:29:53 <sipa> as long as you're offline, sure!
23 2011-12-11 01:29:56 <BlueMatt> they do use php for their website...
24 2011-12-11 01:29:58 <doublec> haha
25 2011-12-11 01:30:05 <sipa> so does facebook
26 2011-12-11 01:30:07 <sipa> oh, wait
27 2011-12-11 01:32:04 <lianj> they go further in insanity, they use hiphop
28 2011-12-11 01:34:26 <copumpkin> facebook at least has some haskell utilities
29 2011-12-11 01:34:29 <copumpkin> they've even published one
30 2011-12-11 01:35:58 <cjdelisle> "much more defined interface"? you have work you'd be interested in sharing?
31 2011-12-11 01:36:31 <cjdelisle> will it make use of event loops at all?
32 2011-12-11 01:40:04 <copumpkin> but anyway, my point is to stop myself statically from accidentally mixing up currencies and quantities
33 2011-12-11 01:46:31 <bd_> data Currency c => Quantity c = Q {-# UNPACK #-} !Word64 ?
34 2011-12-11 01:47:19 <copumpkin> not a fan of datatype contexts, but basically (I'm using Data.Fixed on the quantities to avoid having to do any fixed point adjustment)
35 2011-12-11 01:47:29 <copumpkin> in fact datatype contexts are out as of 2011
36 2011-12-11 01:48:10 <bd_> copumpkin: okay, GADTs then? ;)
37 2011-12-11 01:48:19 <copumpkin> yep
38 2011-12-11 01:48:36 <bd_> if you're using GADTs, how do you verifiy that two Quantities are using the same currency?
39 2011-12-11 01:48:55 <copumpkin> you mean checking at runtime?
40 2011-12-11 01:49:17 <copumpkin> eq :: Currency c -> Currency c' -> Maybe (c :== c') :)
41 2011-12-11 01:49:20 <copumpkin> easy to write
42 2011-12-11 01:49:34 <copumpkin> a decision procedure
43 2011-12-11 01:49:35 <bd_> I meant statically :)
44 2011-12-11 01:49:47 <copumpkin> add :: Currency c -> Currency c -> Currency c
45 2011-12-11 01:49:50 <copumpkin> stuff like that
46 2011-12-11 01:49:59 <copumpkin> except currency is just used as a member of Quantity
47 2011-12-11 01:50:00 <copumpkin> but yeah
48 2011-12-11 01:50:20 <bd_> ah, I see, so you still have the type variable visible, but add typeclass context into the constructors themselves?
49 2011-12-11 01:50:44 <copumpkin> no typeclass for most stuff
50 2011-12-11 01:51:01 <copumpkin> lots of boilerplate around here: http://snapplr.com/9hqr
51 2011-12-11 01:51:05 <copumpkin> that will change when 7.4 ships
52 2011-12-11 01:51:18 <copumpkin> then data Quantity c = Quantity { getQuantity :: Fixed E9, getCurrency :: Currency c }
53 2011-12-11 01:54:56 <copumpkin> :)
54 2011-12-11 01:56:03 <doublec> this channel is almost a #haskell_lite sometimes
55 2011-12-11 01:56:08 <copumpkin> ski_: you played with roconnor's purecoin?