purr changed the topic of #elliottcable to: you
<whitequark> devyn: ok so
<whitequark> i wrote an example in ocaml
<whitequark> check your github
<devyn> whitequark: I suggest we move to a private repo
<whitequark> devyn: it's private already
<devyn> oh
<devyn> it is
<devyn> never mind
<devyn> I'm silly
<whitequark> :p
<devyn> lol
<purr> lol
<devyn> wow, that's beautiful whitequark
<devyn> it's FP but not stupid
<devyn> :D
<whitequark> totally
<whitequark> also lwt is monadic io
<whitequark> basically nodejs but without callback hell and WITH MOTHERFUCKING BACKTRACES
<devyn> haha
<devyn> .mli are header files, essentially?
<whitequark> yes
<devyn> well, I might as well start by translating the basic indicator stuff I wrote in Haskell to ML
<whitequark> let's do this
<whitequark> oh, btw, 1 req/s limit is on bitstamp, not btc-e
<whitequark> btc-e never mentions it limits something
<whitequark> also I screwed up measurement yesterday and the real throughput with ab is 350r/s
<whitequark> but! it's SSL. so if you add http/1.1 pipelining to the mix, that should get much higher
<whitequark> may as well look into that
<whitequark> low latency is everything.
<devyn> it is everything, although we don't have to go to crazy HFT levels of speed
<devyn> I don't think the bots that are currently running are all that advanced
<devyn> most of them
<devyn> it seems like some people with fairly limited programming experience are able to make profitable bots
<whitequark> well, it's nice to have some headroom
<whitequark> also, I like fine technical solutions :p
<devyn> :p
<devyn> still, keep it to minimum necessary
<devyn> maybe have it scale a bit based on current short-term volume
<whitequark> I'll just make it use a connection pool and pipelining
<whitequark> it's not very hard even
<devyn> huh. I wrote your name whitequarl
<devyn> a more amusing nick
<whitequark> oh?
<devyn> whitequarl, because he's white and likes to quarrel
<whitequark> oh
<whitequark> lol
<purr> lol
<devyn> :p
<devyn> it was a typo.
yorick has quit [Read error: Connection reset by peer]
<whitequark> what the fuck does google send me back
<whitequark> P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
<devyn> litecoin is nearly $40 by the way
<devyn> on btc-e
<whitequark> yeah
<devyn> well I'm watching a pretty spectactular minicrash right now
<whitequark> ltc?
<devyn> yeah
<whitequark> I don't think it's minicrash, this kind of shit happens all the time
<whitequark> twice in the previous day
<whitequark> it's going to be back up in no time
<devyn> well whoever started this is pretty successful
<devyn> I know some people with lots of coins to throw around will put some significantly undervalued underneath
<devyn> and hope it goes down even further
<devyn> by doing that
<joelteon> did you read about the guy who threw out his hard drive containing 7500 btc
<devyn> it's not exactly news
<joelteon> ok
<devyn> you can't predict what's going to happen
<joelteon> sorry
<devyn> no, I don't mean because it's not new, I mean because there's nothing spectacular about it
<devyn> if you were in his shoes, you probably wouldn't have given a shit about the bitcoins either
<devyn> they'd be in some file that you forgot about months ago
<whitequark> I once had a tiny metal part of something lying on my floor in one precise place for almost a year
<whitequark> it was like 5mm across
<whitequark> I knew it was there and I was just fine with it
<whitequark> hmmm what the fuck
<whitequark> for some reason my host sends FIN to the remote host
<whitequark> but I don't see this in strace
<devyn> beyond application level?
<whitequark> well, why would that happen
<devyn> yeah, it'd be weird
<whitequark> oh i fucked up transfer-encoding
<whitequark> i think
<whitequark> ok I got pipelining to work, sorta
<whitequark> how the hell do you pronounce queueing?
<joelteon> kyewing
<whitequark> oh
<whitequark> cool
<joelteon> kwaywaying
<devyn> yeah the second ue pair is silent
<devyn> I bought a gaming mouse today
<devyn> nice, subtle, ergonomic one
<devyn> nothing like razer
<devyn> :p
<whitequark> devyn: ok so, pipelined requests to google.com
<whitequark> 200 items in 0.50s: 397.67req/s
<whitequark> oh wait, that's shitty bytecode
<whitequark> native code:
<whitequark> 150 items in 0.06s: 2344.08req/s
<whitequark> that's more like it
<whitequark> with <1% cpu utilization
<whitequark> ok but I need to handle errors...
<whitequark> hm, seems I'm benchmarking it wrong
<whitequark> yeah, I totally am
<devyn> yeah?
<whitequark> ugh
<whitequark> Sys.time returns not wall clock time
<whitequark> but cpu time used by the process!
<whitequark> no wonder results are totally off
<devyn> ah fun
<whitequark> ok, I get rate-limited by google
<whitequark> needs more CSP
<devyn> do float operators really have to be suffixed with . :'(
<whitequark> yes
<whitequark> no typeclasses in ocaml
<whitequark> this is probably the worst part of it
* devyn sighs
<devyn> it'll be alright
<whitequark> devyn: pull maybe
<devyn> File "util/http_pipe.ml", line 33, characters 65-78:
<devyn> Error: The function applied to this argument has type host:string -> service:string -> (Lwt_chan.in_channel * Lwt_chan.out_channel) Lwt.t
<devyn> This argument cannot be applied without label
<whitequark> crap, different lwt versions
<whitequark> which is yours
<whitequark> ?
<devyn> 2.4.4
<whitequark> mine is 0.9.0, wat
<devyn> Installed packages for system:
<devyn> lwt 2.4.4 A cooperative threads library for OCaml
<whitequark> oh, lwt, right, mine is 2.4.3
<whitequark> what about cohttp?
<devyn> 0.9.11
<whitequark> where did you install it from?
<devyn> opam
<whitequark> $ opam repository
<devyn> 0 [http] default https://opam.ocaml.org
<whitequark> ocaml.org!
fwg has quit [Ping timeout: 246 seconds]
fwg has joined #elliottcable
<devyn> hahahahahaha
<whitequark> LOL @ strawberries
<purr> LOL
<devyn> the weird vegetables thing is so true
<devyn> they're like random plants and you have no clue what they're called but they're not bad when cooked right
<whitequark> lol
<whitequark> sequence their DNA!
<whitequark> then run a BLAST search against pubmed and figure out the precise species
<devyn> yeah seen it a few times haha
<devyn> apparently it's a whole line of joke products
<devyn> that may be the original manufacturer
<devyn> maybe not
<devyn> I don't even know
<devyn> ↑ it's that
alextgordon has quit [Ping timeout: 240 seconds]
<cuttle> devyn: the mencius moldbug post?
<cuttle> devyn: and yeah it is definitely the creator of urbit
<cuttle> devyn: he's crossposted urbit things on that blog
<cuttle> and he doesn't keep it a secret
<whitequark> 'moldbug' ?
<devyn> well it kinda does take someone completely insane to make something like that and actually understand it
<devyn> and then try to market it like it's better somehow
<whitequark> devyn: fixed
<whitequark> also, motherfucking btc-e.com doesn't do persistent connections
<whitequark> oh, hm
<whitequark> wtf
<devyn> it closes after a Connection: keep-alive?
<devyn> I doubt they'd intentionally contradict the spec
<whitequark> yes, it does
<devyn> huh
<whitequark> oh, hm
<whitequark> Ssl.ReadEror
<whitequark> I wonder why
<whitequark> no, it actually doesn't
<whitequark> that's likely a bug in some of the libraries
fwg has quit [Ping timeout: 272 seconds]
<whitequark> ooooh I see
<whitequark> I'm fucking dumb
<whitequark> and fail at http
<cuttle> devyn: haha yeah
<cuttle> devyn: it's really not better than *anything*
<cuttle> it's a piece o shit
<cuttle> maybe the federation p2p shit is ok
fwg has joined #elliottcable
<cuttle> but the basis for it, like if this were literally a mars thing for thousands of years
<cuttle> everything would be a mess
<devyn> the p2p collaboration is kind of neat honestly... but everything is fucking moony
alextgordon has joined #elliottcable
alextgordon has quit [Client Quit]
<whitequark> ok I finally fixed it
<whitequark> devyn: 50 items in 18.39s: 2.72req/s
<whitequark> this is btc-e, pipelining, persistent connection
<whitequark> one connection.
<cuttle> devyn: like it's about on the level of cPaws as a foundational language, really :p
<devyn> cuttle: if hoon is cpaws then what is nock
<devyn> whitequark: is there a stdlib function minimum : 'a list -> 'a, or should I just fold over min? (and same for max)
<whitequark> fold
<whitequark> latency: mean 10.88s median 11.26s
<whitequark> this is... not cool at all
<devyn> eh?
<devyn> I don't think that's typical
<whitequark> oooh
<whitequark> it's an artefact of how I measure time :/
<whitequark> 10 items in 3.50s: 2.86req/s
<whitequark> latency: mean 2.26s median 2.66s
<whitequark> 0.82 0.92 1.16 2.05 2.25 2.66 2.87 3.07 3.28 3.50
<whitequark> can you guess what happens here?
<devyn> you're not recording an initial time each iteration?
<whitequark> well, I do
<whitequark> but I'm starting all requests in parallel
<whitequark> so initial time for them = 0
<devyn> but they return in sequence?
<whitequark> because I only have one connection, yes
<whitequark> pipelining.
<devyn> yeah, so that's why
<devyn> :p
<whitequark> ok so what do I do next...
<whitequark> maybe a connection pool?
<devyn> maybe
<whitequark> oops, I accidentally a tail call
<devyn> whitequark: say I have a function nPeriodAlpha n | n > 0 = 2 / (n + 1)
<devyn> in Haskell
<devyn> is there any way to leave the function undefined for values <= 0
<devyn> in OCaml?
<devyn> or must I use an exception
<devyn> (that's what I'm doing right now)
<whitequark> no, there's not
<whitequark> assert (n > 0)
<devyn> whitequark: float negation: cleaner way than f *. -1.?
<whitequark> -.0.1
<devyn> whitequark: added StochRSI, which I feel is a good signal to include
<whitequark> devyn: nice!
<whitequark> btw, you can make ocamldoc comments with (** *)
<devyn> should those be in the interface or implementation file?
<whitequark> interface
<devyn> 'kay
<whitequark> (and there's usually no leading * on following lines, but this is totally unimportant)
<devyn> oh I don't know, I was just going by some style guide used by some cornell course
<whitequark> ah
<whitequark> you decided against realworldocaml?
<devyn> I'll look through it for specific things but it's far too verbose when I just want to jump right in
<devyn> I don't need an introduction to functional programming
<devyn> just OCaml
<devyn> :p
<whitequark> ah sure
fwg has quit [Ping timeout: 252 seconds]
<cuttle> devyn: idfk hoon nock
<whitequark> something really strange happened
<cuttle> devyn: i just mean that it's not like a very good fundamental bedrock
<whitequark> i think i've sorta been outsmarted by runtime
<whitequark> but how
<whitequark> so basically I have a connection pool and a function to select the least busy connection
<whitequark> if I replace it with pool.(Random.int (Array.length pool)) it works
<whitequark> if I replace it with pool.(0) it *garbage collects* all other connections
<whitequark> how the fuck
<whitequark> ocaml's compiler is like
<whitequark> dumb as a brick
<joelteon> how many does it gc if you try .(1)
<whitequark> everything except #1
<joelteon> huh
<joelteon> i would say it couldn't predict what to GC, but
<whitequark> exactly
<joelteon> is that being inserted at compile time?
<joelteon> how odd
<whitequark> now the most interesting part
<whitequark> I had an actual algorithm for selecting a connection
<whitequark> and I misplaced < for >
<whitequark> so it always selected connection #0
<whitequark> how on earth did it figure out that
<joelteon> optimization man
<whitequark> ooooh
<whitequark> actually no
<whitequark> it's like, the array was temporary
<whitequark> it doesn't *look* like it goes out of scope but it does because of monads
<whitequark> and tail calls
<whitequark> so only those connections which I have scheduled beforehand were referred from anywhere when the array did go out of scope
<whitequark> fun
<whitequark> wow, I caused a segfault in ocaml
<whitequark> devyn: ping
<whitequark> so I wrote http_pool
<whitequark> 1000 items in 3.75s: 266.63req/s
<whitequark> but half of those is 503 because cloudflare
<whitequark> this should still be more than enough
<whitequark> also, pipelining totally wins ssl
<whitequark> was 100% worth it
eligrey has quit [Quit: Leaving]
fwg has joined #elliottcable
Sorella_ has joined #elliottcable
Sorella_ is now known as Sorella
Sorella has quit [Changing host]
Sorella has joined #elliottcable
yorick has joined #elliottcable
niggler has quit [Quit: Computer has gone to sleep.]
alextgordon has joined #elliottcable
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
gozala has quit [Quit: Connection closed for inactivity]
eligrey has joined #elliottcable
niggler has joined #elliottcable
niggler has quit [Quit: Computer has gone to sleep.]
alextgordon is now known as alexgordon
niggler has joined #elliottcable
Sgeo has quit [Read error: Connection reset by peer]
Sgeo has joined #elliottcable
trolling has quit [Ping timeout: 272 seconds]
trolling has joined #elliottcable
mcc has joined #elliottcable
Sorella has quit [Quit: Ex-Chat]
niggler has quit [Quit: Computer has gone to sleep.]
<whitequark> hi devyn
<joelteon> hi devyn
<joelteon> happy thanksgiving evereyone in the united states of A
<alexgordon> joelteon: I don't know what the fuck people do on thanksgiving, but happy pre-christmas!
<joelteon> alexgordon: we eat lots of food and watch sports
<alexgordon> I see
<joelteon> thanks, you too
<alexgordon> not *play* sports
<alexgordon> just watch them
<alexgordon> it is the American Way™
<joelteon> no we relax
<alexgordon> omg I just realized
<joelteon> do people in other countries play sports after they've eaten a huge lunch
<joelteon> do people in other countries spend a lot of time vomiting
<alexgordon> americans don't have the queen's speech at christmas
<alexgordon> does obama at least do a message?
<alexgordon> he's like the queen of america right?
<joelteon> why were you alextgordon
<alexgordon> joelteon: it was T time
<joelteon> makes sense
<joelteon> ok
<joelteon> is that obama
<mcc> YOU'RE obama!
<joelteon> good point
<whitequark> joelteon: vomiting?
<joelteon> yeah, when they play sports after eating large meals
fwg has quit [Ping timeout: 264 seconds]
fwg has joined #elliottcable