purr changed the topic of #elliottcable to: you
Sorella has joined #elliottcable
Sorella has joined #elliottcable
PLejeck has quit [Changing host]
PLejeck has joined #elliottcable
PLejeck is now known as nuck
yorick has quit [Remote host closed the connection]
Sorella has quit [Quit: Ex-Chat]
brr has joined #elliottcable
brr has quit [Client Quit]
brr has joined #elliottcable
alextgordon has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<whitequark> devyn: hi
<devyn> hi whitequark
<whitequark> have some free time?
<devyn> almost
<devyn> just wait like, a few minutes
<devyn> :p
<whitequark> yeah
<whitequark> I accidentally a graphics toolkit.
<devyn> you naughty boy
<devyn> whitequark: alright, hi
<whitequark> hi devyn
<devyn> wadda shtatus whitequark
<whitequark> check out the code, look at trader.ml and readhist.ml
<whitequark> basically it now computes ticker from either live or stored data
<whitequark> oh and
<whitequark> archive of tonight's crash: http://rghost.ru/50587557
<devyn> I don't see readhist
<whitequark> hm
<whitequark> git pull again
<devyn> lol
<purr> lol
<devyn> whitequark: alright, how do I run it on stored data?
<whitequark> unpack it, then
<whitequark> ./readhist.d.byte btce/btc_usd
<whitequark> need to make it before
<devyn> right
<whitequark> or just ocamlbuild -use-ocamlfind ./readhist.d.byte -- btce/btc_usd
<whitequark> I have alias ob=ocamlbuild -use-ocamlfind
<whitequark> btw, .d.byte means debug bytecode executable. .byte and .native are non-debug versions
<whitequark> to get a backtrace, export OCAMLRUNPARAM=b
<whitequark> (OCaml uses exceptions as a means of control flow *extensively* so it records no backtraces by default. that way, raise is just a jmp)
<devyn> that doesn't sound good lol
<purr> lol
<whitequark> why?
<devyn> well, state and all, if there is any
<whitequark> see, it has no return or break or continue statements
<whitequark> so if you want to use its imperative features
<whitequark> or just break out of List.iter
<devyn> mm
<whitequark> you raise an exception and it's cheap
<devyn> alright
<devyn> whitequark: these are 30 second periods, eh?
<whitequark> devyn: yeah
<whitequark> i am an impatient tester, adjust it however you need
<devyn> alright
<whitequark> readhist.ml is like
<whitequark> ten lines
<whitequark> it's fucking beautiful
<devyn> haha
<devyn> idk, so far I'm not that impressed with OCaml compared to Haskell beauty-wise
<whitequark> oh?
<devyn> seems very noisyt
<devyn> noisy*
<devyn> and any sane person writes Haskell with layout, which makes things very clear
<whitequark> mhm, the syntax has some idiosyncrasies, but you get used to it quickly
<whitequark> (then I've not seen haskell code written by sane people)
<whitequark> but
<whitequark> that was not what I'm referring to
<whitequark> it's beautiful semantically :p
<devyn> heh
<devyn> how does 'lwt … = …' work?
<devyn> is it a macro?
<whitequark> yes
<whitequark> "lwt a = f in x" ≡ "bind f (fun a -> x)"
<devyn> I figured
<whitequark> aka "f >>= fun a -> x"
<whitequark> there's a few more. "a >> b" ≡ "a >>= fun () -> b"
<devyn> yes I know how monads work
<devyn> Haskell uses them extensively, unfortunately
<whitequark> oh ok, I don't, I'm just familiar with lwt :p
<devyn> :p
<whitequark> (actually, I do, I just have no idea whether haskell uses same syntax or not)
<whitequark> btw if you want to see how the code is expanded
<devyn> yeah, it does; >>= is bind, >> is sequence, return is return
<whitequark> ocamlbuild -verbose 1, then look at ocamlc invocation, then run it with -verbose too
<whitequark> there will be a camlp4 invocation, copy it, change -printer 'p' to -printer 'o'
<whitequark> look at the resulting code
<devyn> alright how would I go about wrapping one of my indicators into an LWT stream
<whitequark> look at exchange.ml:39
<whitequark> the ticker calculator
Sgeo_ is now known as AntiVariousPro
<devyn> what does the backtick in `Ask and `Bid mean
<whitequark> polymorphic variants
AntiVariousPro is now known as AntiVariousProte
<whitequark> basically same as normal variants, except you can specify them as extensible (doesn't matter here) and they're stored differently so you do not need to specify full module path to use them
<whitequark> (stored as a hash instead of contiguous numeric values)
<whitequark> writing Exchange.TradeKind.Ask gets old fast
<devyn> oh interesting
<devyn> whitequark: in case you want to know, this is indicators.ml in Haskell https://gist.github.com/devyn/9df30ee21c2e8ec3bf64
<devyn> to compare*
<whitequark> yeah, it's cleaner because typeclasses
<devyn> pretty much
<whitequark> otherwise it's more or less same thing
<devyn> datatype syntax/semantics are also more complex and better
<whitequark> in ocaml?
<devyn> in Haskell
<whitequark> hm
<whitequark> not familiar
<devyn> all datatypes in Haskell are combined enum/record types
<devyn> and can have polymorphic variables
<devyn> (see data RSData a = … -- a is a type variable)
<whitequark> type 'a rsdata = { 'a rsupaverage } ...
<whitequark> er
<whitequark> type 'a rsdata = { rsupaverage : 'a; } ...
<whitequark> but
<whitequark> without typeclasses :(
<devyn> mmhm, in Haskell I mostly just assume the Fractional typeclass
<devyn> but
<devyn> also the enum/record thing is quite useful
<whitequark> in ocaml you can achieve a similar (but not same) degree of polymorphism with a) functors b) manually written vtables
<whitequark> frankly both suck
<whitequark> but, you use what you have.
<devyn> like
<devyn> ok
<devyn> in OCaml
<devyn> you have
<devyn> type 'a option = Some of 'a | None
<devyn> in Haskell that's
<devyn> data Maybe a = Just a | Nothing
<devyn> but you can also write
<devyn> data Maybe a = Just { justValue :: a } | Nothing
<whitequark> yeah I figured
<devyn> and then access it with
<devyn> justValue :: Maybe a -> a
<devyn> i.e.
<devyn> justValue (Just 2) => 2
<devyn> justValue Nothing would throw an undefined exception
<whitequark> btw, weren't haskell exceptions like
<whitequark> unsound
<devyn> idk about that but they're basically bound to the value, so a lazy value can contain an exception dormantly until it's evaluated
<devyn> which can be annoying
<devyn> if I define
<devyn> blah :: Int
<devyn> blah = error "this is an error"
<devyn> and make a list [blah, 2, 3]
<devyn> but never evaluate blah
<devyn> the exception never occurs
<whitequark> right
<whitequark> ocaml has lazy values too!
<whitequark> lazy 1;;
<devyn> yeah but Haskell is lazy by default :p
<whitequark> not sure it's a feature :p
<devyn> it will do strict evaluation fairly easily though
<devyn> probably Haskell's main flaw is that its string type by default is [Char]
<devyn> very semantically clean, but horrible to optimize
<devyn> because semantically it's a linked list of chars
<whitequark> doesnt' lisp have it pretty much the same way?
<whitequark> I think lisp machines had strings as lists of chars
<whitequark> I thought it was horrible
<devyn> it's nice to work with but performance-wise it's awful
<devyn> and GHC tries to optimize away the linked list part when it can, I think, because that just does not fly on modern machines at all
<whitequark> yeah linked lists have horrible data locality
<whitequark> and trees
<whitequark> and caches want to murder you
<devyn> anyway a lot of people use Data.Text and Data.ByteString instead
<devyn> where ByteString is strict strings of bytes
<devyn> and then Text is built on top of ByteString with UTF-8
<devyn> and thanks to polymorphism
<devyn> with an extension
<devyn> GHC will make all strings polymorphic
eligrey has quit [Quit: Leaving]
<devyn> so you can use them pretty easily
<whitequark> cool
<devyn> really thanks to typeclasses, not polymorphism
<devyn> :p
<devyn> oops.
<devyn> yeah, GHC is really a very, very advanced compiler
<devyn> it needs to be
<devyn> :p
<devyn> because Haskell code is basically entirely theoretical
<devyn> and abstract
<devyn> it tries to distance itself from reality
<devyn> you can't even assume that enum types are integer-based underneath or anything
<whitequark> in ocaml, there's a coq bridge
<whitequark> it just uses Obj.magic whenever coq's type system is stronger than ocaml's
<whitequark> which is basically
<whitequark> static_cast<>
<devyn> well OCaml and Coq's type systems are basically polar opposites
<devyn> haha
<devyn> Coq has value-dependent typing, does it not?
<whitequark> I think
<devyn> well yeah, that's like, the ultimate
<devyn> um, hi vim, why the fuck did you just hang
<devyn> whitequark: how does printf end up working in OCaml? Haskell uses weird typeclass hacks to accomplish it
<whitequark> special-cased in type system
<devyn> ah
<devyn> it's pretty clever
<whitequark> but not typesafe?
<joelteon> it's typesafe but it calls error sometimes
<devyn> it can't parse the string at compile time
<joelteon> so it's not typesafe
<devyn> so the type safety is runtime
<whitequark> so ocaml's printf is better :p
<joelteon> does ocaml have dependent types
<whitequark> no
<devyn> no, it's just a special case :p
<joelteon> how does it do printf?
<devyn> special case joelteon
<joelteon> oh ok
<joelteon> i wrote th-printf just for this purpose
<devyn> ew th
<devyn> whitequark: isn't there some simple way to just make a stream transformer that folds into an output stream and internal state?
<whitequark> devyn: can you elaborate?
<whitequark> there's Lwt_stream.map
<devyn> map isn't quite good enough; I need to fold into my own internal state at the same time - each output value is dependent upon the last output value as well
<whitequark> fold ?
<whitequark> :p
<whitequark> Lwt_stream.fold_s
<whitequark> or more like, just fold
<devyn> hmmm, but I also want to produce a stream like map
<devyn> fold returns an Lwt.t
<devyn> which is not what I want
<whitequark> oh
<whitequark> then there's no such combinator
<whitequark> write it :p
<devyn> klfjafjalksjf I'm going to bed lol
<purr> lol
<devyn> I started on it and then I guess one of the plugins I installed for Vim likes to crash it
<devyn> and I deleted the swap file
<devyn> out of stupidity
<devyn> so
<devyn> whatever.
<whitequark> okay
<whitequark> (why the fuck editor plugins may crash editor is beyond me)
<whitequark> devyn: so, continue tomorrow?
Sgeo has joined #elliottcable
AntiVariousProte has quit [Ping timeout: 260 seconds]
Sorella has joined #elliottcable
fwg has joined #elliottcable
gazoombo_ has joined #elliottcable
silentbicycle_ has joined #elliottcable
gazoombo has quit [Ping timeout: 240 seconds]
silentbicycle has quit [Ping timeout: 240 seconds]
fwg has quit [Ping timeout: 240 seconds]
silentbicycle_ is now known as silentbicycle
gazoombo_ is now known as gazoombo
fwg has joined #elliottcable
Sorella has quit [Remote host closed the connection]
alextgordon has joined #elliottcable
Sorella has joined #elliottcable
Sgeo has quit [Read error: Connection reset by peer]
Sorella_ has joined #elliottcable
Sorella has quit [Ping timeout: 260 seconds]
Sorella_ has quit [Client Quit]
Sorella has joined #elliottcable
Sorella has joined #elliottcable
Sorella has quit [Changing host]
fwg has quit [Ping timeout: 252 seconds]
fwg has joined #elliottcable
yorick has joined #elliottcable
yorick has quit [Remote host closed the connection]
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
<whitequark> wow, there's an almost revolution in ukraine
<whitequark> 200k-1.6m people and an assault attempt at the president's administration
<alextgordon> break out the poison!
<whitequark> poison?
<alextgordon> whitequark: russians love three things: 1) alcohol, 2) bombs, 3) poison
<alextgordon> though you can argue that 1 and 3 are the same
<whitequark> no bears? I'm surprised
* alextgordon calls rule 34 on putin wrestling a bear
<whitequark> -rule34 putin bear
<whitequark> -34 putin bear
<alextgordon> -34 putin bear
<whitequark> -34 putin
<purr> whitequark: Here. <http://bit.ly/1a1IY6b> [NSFW]
<purr> whitequark: ... if you had any sense, you wouldn't have asked.
<alextgordon> oh god
<whitequark> oh god
<whitequark> lol
<purr> lol
<whitequark> what the actual fuck
<alextgordon> that's enough internet for one day
<alextgordon> o_o
<whitequark> ukraine ^
<whitequark> (use google translate)
<whitequark> you usa folks are pussies by comparison :]
<joelteon> dude
<joelteon> why the fuck
<joelteon> do people have presentations that consist of 8 powerpoint slides and then reading every item off the slides
<joelteon> I CAN READ FINE MYSELF
<joelteon> JUST GIVE ME THE SLIDES
<joelteon> yeah i saw it
<alextgordon> I'm only going to post that from now on
<alextgordon> it will be my mission
<joelteon> i'm amazed that i just escaped a 2 hour meeting and they still didn't tell me what i actually needed to know
<purr> lol
<alextgordon> lol yeah, who wants to live in guildford
<purr> lol
<alextgordon> especially in the 70s!
<alextgordon> though apparently 70s guildford has slutty girls
fwg has quit [Ping timeout: 246 seconds]
<whitequark> fuck, btc-e no longer accepts bank transfers :/
<alextgordon> ooh
<alextgordon> that means the price on btc-e will go up
fwg has joined #elliottcable
<whitequark> well, it's for RUB transfers
<whitequark> international wire transfers still accepted, but it's a PITA
<whitequark> on other hand, I *may* get a better exchange rate with my bank than on btc-e itself
<whitequark> it's really a horrible situation where you currently need 2-3 intermediaries between your bank account and btc-e and they all charge outrageous amounts
<joelteon> is there a fixed number of bitcoin?
<whitequark> yeah, 22m
<joelteon> is it reasonable to assume we'll find them all
<whitequark> that's the idea
<joelteon> ooh
<alextgordon> joelteon: upper bound of 12m right now though
<alextgordon> joelteon: also bitcoins aren't "found" they're allowed to be created by the network
<joelteon> right
<joelteon> wherever bitcoin come from
<alextgordon> if someone reprogrammed all the clients to say there could be 40m bitcoins, then there could be 40m bitcoins
<joelteon> the electronic stork in the sky
<alextgordon> :D
<alextgordon> still don't understand how anybody had the genius to create bitcoin
<alextgordon> it's one of those things where... anybody can understand how it works (with enough grounding in cryptography), but nobody thought of it until recently
<joelteon> I dunno how it works
<alextgordon> tbh I find bittorrent to be more difficult
<alextgordon> all that dht stuff
<joelteon> yeah bittorrent is crazy
<whitequark> BA -> Visa -> Qiwi -> BTC-e is 5.525% but more like ~11% if you take USD/RUR exchange rate into account
<whitequark> holy fuck
<joelteon> so i kinda get how bitcoin works now
<joelteon> cursory glance at wikipedia
<whitequark> BA -> Contact -> OKPAY -> BTC-e is 3.53% but really ~9%
<whitequark> and requires verification
<whitequark> and requires me to physically move my arse
<joelteon> so who's the one who decides what a valid bitcoin is
<whitequark> network consensus
<whitequark> a majority system basically
<alextgordon> joelteon: all the nodes have a copy of the blockchain, it's trivial to check it
fwg has quit [Quit: gone]
<joelteon> and the blockchain stores every transaction that's ever happened?
<alextgordon> yep
<joelteon> cool
<joelteon> including who spent it, or just where the btc went?
<whitequark> both
<alextgordon> including the key that spent it
<joelteon> oh heavens
<alextgordon> that's needed to sign it
<joelteon> what happens if you buy something illegal with it
<alextgordon> joelteon: you get something illegal
<joelteon> and then there's proof you bought it
<alextgordon> there's proof someone bought it
<alextgordon> depends where you got your bitcoins from
<joelteon> yeah, and the someone is you
<alextgordon> yeah but the blockchain doesn't say that
<joelteon> ok
<joelteon> so the blockchain includes who spent it, but not who spent it
<whitequark> plus there's money laundering services
<alextgordon> it says "Address a990d12j09d12j transfered 0.3 BC to address jd092k1092d902"
<whitequark> aka mixers
<alextgordon> yeah
<alextgordon> or you can just convert to litecoin and back again
<alextgordon> etc
<joelteon> ok, makes sense
<alextgordon> so it's semi-anonymous
<whitequark> pleudonymous
<whitequark> *pseudo
* alextgordon likes pleudonymous better
<alextgordon> it's like encryption... theoretically it's possible to do it correctly, but most people fail
<alextgordon> it seems the US government is betting on the second right now, but I think they'll be in a rude awakening when people figure out how to anonymize themselves
<whitequark> nah, they're betting on stupidity
<joelteon> how can you anonymize yourself if the blockchain records that a transaction was made using your public key to an illegal service
<whitequark> never underestimate stupidity.
<whitequark> and laziness!
<alextgordon> joelteon: it's not your PGP key... it's a one-time key
<joelteon> oh
<alextgordon> it only identifies you if you let it
<joelteon> ok that's different
<whitequark> plus, you don't need to catch everyone, you only need to catch most of them
<joelteon> makes more sense
<whitequark> or not even most
<whitequark> enough to scare the rest.
<joelteon> for a second it was sounding like a credit card
<alextgordon> joelteon: most bitcoin clients will give you different receiving addresses
<alextgordon> at least electrum does
<alextgordon> so every time you do a transaction you use a new address
<joelteon> cool
<alextgordon> and when you spend bitcoins, there's the concept of "change" where you construct a transaction that has an output to yourself
<whitequark> hm, so, looks like international wire transfer is the most efficient way for a RU resident to deposit to RU-affiliated exchange
<whitequark> which is funny
<whitequark> also, IWT seems to be a horrible pain in the ass
<alextgordon> ...which makes it difficult to tell whether you sent the bigger amount or the smaller amount
<joelteon> nice, my loan officer used an apostrophe s where only an s was appropriate
<whitequark> loan officer?
<joelteon> whatever you call them
<joelteon> loan agent
<alextgordon> ?
<joelteon> the person giving me a loan
<alextgordon> loan shark?
<joelteon> yeah
<alextgordon> whitequark can recommend some to you
<whitequark> lol
<purr> lol
<joelteon> that
<joelteon> sure
<whitequark> alextgordon: he's not a RU resident
<alextgordon> I want one of those 10% interest bank accounts though!
<joelteon> the question is, .ru?
<whitequark> 120%, alextgordon, 120%
<alextgordon> 120%?!
<whitequark> yearly, yes
<alextgordon> dayum
<alextgordon> what about regular banks?
<whitequark> that's somewhere in range of 7-10%
<whitequark> where for 10% you need to deposit like
<alextgordon> wow
<whitequark> $30k for 3 years
<whitequark> and you can't take it out early
<whitequark> not even partially
<whitequark> the less money, time or more flexibility you want, the less % you will get
<alextgordon> though that's in rubles, so you're petting the ruble won't devalue by 10%/year for the next 3 years
<alextgordon> *betting
<whitequark> it's pretty straightforward if you analyze the patterns, I wish they just put up a nice table :/
* whitequark spent a good day comparing their offerings
<whitequark> hm
<whitequark> current inflation rate is 6.3%
<alextgordon> yeah but that's in russia only
<whitequark> since 2010 it was below 10% all the time
<alextgordon> like if the GBP/RUB changes unfavourably, it could wipe out any interest
<whitequark> (and in 2010 they had much better loans)
<whitequark> er
<whitequark> deposits
<whitequark> oh actually
<whitequark> it's not 7-10%
<alextgordon> I have no idea how much interest I get on my savings
<whitequark> it's 4.40%-9.50%
<whitequark> so you barely beat inflation, and unless you have a fuckton of money, you don't
<joelteon> i didn't realize how terrible simple's interest rate was until recently
<alextgordon> hm they don't say xD
<alextgordon> 1%
<alextgordon> not even worth bothering about
<alextgordon> fixed term is a bit better at 2%
<whitequark> that's about same you get here for USD
<whitequark> euro is even less
<alextgordon> government says inflation is 2.2% so I'll assume it's 3% :P
<whitequark> lol they can't lie about that
<purr> lol
<alextgordon> oh they can, they're very good at it :P
<alextgordon> inflation is just a calculation of how a standard basket of goods has appreciated in price, and they control the basket of goods
<whitequark> hmmm
<alextgordon> obviously inflation is different for every person
<alextgordon> if you buy lots of rice, and the price of rice goes up then your personal inflation goes up
<alextgordon> I think I'm pretty atypical though
<alextgordon> I buy more computer equipment, less trips to magaluf
<whitequark> which equipment?
<alextgordon> ALL EQUIPMENT
<alextgordon> I have so many computers...
<whitequark> why?
<alextgordon> whitequark: gotta catch 'em all
<purr> lol
<whitequark> Cashiers, bookkeepers, and bankers were reportedly the most prone to this affliction.[2] Besides a compulsion to write endless strings of zeros, individuals that suffered from this condition would reportedly become confused when referring to numbers and would state that they were ten billion years old or had forty trillion children.
<alextgordon> hahaha
<alextgordon> new favourite wikipedia article
* whitequark is reading up on 1879 english contract law case
<whitequark> "despatch" is driving me insane
Sorella has quit [Quit: Ex-Chat]
yorick has joined #elliottcable
eligrey has joined #elliottcable
gozala has joined #elliottcable
<alextgordon> cuttle: your lot are targeting me! http://i.imgur.com/HFeRPl5.png
<alextgordon> tell 'em I'm not interested
* cuttle calls up his contacts in the SLC headquarters
<cuttle> alextgordon: they won't be bothering you anymore
<jesusabdullah> I have an emergency BoM
<jesusabdullah> it was in my glovebox when I bought my car
<jesusabdullah> ahhh, Provo
<jesusabdullah> <3
<cuttle> jesusabdullah: haha are/were you mormon? or what
<jesusabdullah> cuttle: no I moved to Salt Lake City
<jesusabdullah> cuttle: and worked in Provo before I got laid off last Monday
<alextgordon> you got laid? way to go!
<jesusabdullah> no, laid OFF
<jesusabdullah> was working on getting laid but like
<jesusabdullah> if I'm moving again
<jesusabdullah> ಠ_ಠ
<cuttle> well provo will be a tough place to find girls not saving themselves for marriage ;p
<cuttle> SLC is good though
<cuttle> :p
<cuttle> jesusabdullah: so the book of mormon is to deter missionaries by proving that you're mormon? or what
<jesusabdullah> cuttle: in case of rapture break glass
<jesusabdullah> yeah cuttle SLC's p alright, I got kisses at a halloween party so
<alextgordon> cuttle: I dunno, I think they'd drop their underwear for *jesus*
<cuttle> up at the U there are probably way more mormons than non mormons
Sgeo has joined #elliottcable