Re: Heroku Clojure scheduled tasks versus worker threads

2013-06-17 Thread danneu
Heroku cron jobs and workers are prorated like dynos. They run in their own processes. So does booting into heroku bash or heroku console. Workers generally consume a queue. I'm not sure what you mean by "worker thread" though. Workers don't run in a thread, and you can launch plain old threads

Re: Heroku Clojure scheduled tasks versus worker threads

2013-06-18 Thread danneu
fference between a heroku > scheduled command (which I currently am running, wakes up, does some work, > etc) and a 'worker process' type? Does the latter need a job queue set up? > Does it run constantly, checking that queue and consuming work items from > it? > >

Re: Recursive codec/frames in gloss?

2014-10-10 Thread danneu
I took a stab at it for 10 minutes, but I'm way too rusty. Last year I implemented the blockchain wire protocol with gloss that might be helpful: https://gist.github.com/danneu/7397350 Here's the spec: https://en.bitcoin.it/wiki/Protocol_specification The var-int-codec is a somewh

Re: CCW bug [SEVERE]

2014-10-25 Thread danneu
Fluid Dynamics wrote: > I do not ever want to see anything purportedly "STABLE" do something like > that ever again > There are a lot of things I do not ever want to see. I don't want to see debt collectors or clojure stacktraces or my uncle Frank. Unfortunately, demanding that I don't see t

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread danneu
Play around with this: $ lein new compojure myapp $ cd myapp $ lein ring server-headless Started server on port 3000 On Thursday, April 10, 2014 9:13:19 AM UTC-5, Kashyap CK wrote: > > Hi, > I have the opportunity to build a set of services from scratch. I plan to > use clojure

Re: Parsing large XML files

2013-12-17 Thread danneu
e state as your consume the sequence. That's actually how I'm used to working with SAX parsers anyways. Here are some naive Ruby examples if it's new to you: https://gist.github.com/danneu/3977120. Of course, I imagine the ideal solution would involve some way to express selectors on

Re: [Large File Processing] What am I doing wrong?

2014-01-26 Thread danneu
let [[_ _ _ url & _] (str/split line #"\t")] [(m/md5 url) url]))] (->> (drop 1 (line-seq rdr)) (map extract-url-hash) (into {} https://gist.github.com/danneu/8644022 On Tuesday, January 21, 2014 1

Re: Looking for a reference binary parsing

2014-01-27 Thread danneu
ztellman's Gloss is magic to me. - Here's an example of my first attempt to use Gloss to parse the Bitcoin protocol: https://gist.github.com/danneu/7397350 -- In 2-chan.clj, it demonstrates using ztellman's Aleph to send Bitcoin's verack handshake to a node and ask it f

Re: Looking for a reference binary parsing

2014-01-28 Thread danneu
which happens to be splendid for masochism. On Monday, January 27, 2014 8:39:59 PM UTC-6, Cedric Greevey wrote: > > On Mon, Jan 27, 2014 at 4:13 PM, danneu >wrote: > >> ztellman's Gloss is magic to me. >> >> - Here's an example of my first attemp