Re: [ANN] cljzmq-0.1.1 - A Clojure binding for ØMQ

2013-07-30 Thread Trevor Bernard
Here is a simple way to send and receive Clojure data over ØMQ: https://gist.github.com/trevorbernard/6118918 On Monday, July 29, 2013 10:00:13 AM UTC-3, Trevor Bernard wrote: Hello, I'd like to announce the immediate availability of cljzmq-0.1.1 on maven central. https://github.com

[ANN] cljzmq-0.1.1 - A Clojure binding for ØMQ

2013-07-29 Thread Trevor Bernard
Hello, I'd like to announce the immediate availability of cljzmq-0.1.1 on maven central. https://github.com/zeromq/cljzmq For sample usage, I've started porting the zguide examples here: https://github.com/trevorbernard/cljzmq-examples Pull requests welcome! Warmest regards, Trev -- --

Jenkins/leiningen trigger build when a snapshot gets updated

2013-07-06 Thread Trevor Bernard
Hi, Does there exist a Hudson/Jenkins plugin for leiningen to trigger a build when a SNAPSHOT dependency gets updated? Warmest regards, Trevor -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Understanding boxing

2013-05-14 Thread Trevor Bernard
If you want to be 100% sure, AOT-compile your code and look at the emitted Java classes with `javap`. Some observations I found about autoboxing and Clojure. If you typehint a deftype/defrecord with a primitive, the generated class will store it as it's primitive type but this is not the

[ANN] phaser-1.1.2 - A Clojure DSL for the LMAX Disruptor 3.0.1

2013-04-16 Thread Trevor Bernard
I'd like to officially announce the immediate availability of Phaser, a Clojure DSL for the LMAX Disruptor 3.0.1. https://github.com/userevents/phaser Pull requests welcome! -Trev -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Clojurescript One and Websockets

2012-08-03 Thread Trevor Bernard
Any updates Kushal Pisavadia on Websockets and Ring jiving? On Monday, March 19, 2012 9:40:20 AM UTC-3, Kushal Pisavadia wrote: I am in discussion with James, but it's very high-level at the moment and no work has been done on integration yet. I don't think it'll get into the next tagged

ClojureScript: Problem with - macro and many arguments

2012-04-09 Thread Trevor Bentley
I'm not sure if this is a problem with Safari/WebKit or ClojureScript (or neither, maybe this is expected behavior). I implemented the game logic of my Tempest game by threading a game state structure through a long series of functions with the - macro. At some point during development, it

Re: I'm writing a Tempest clone in ClojureScript

2012-04-08 Thread Trevor Bentley
That's in my TODO list... seems that the Google Closure keyboard handler just doesn't two keys at once, so key handling eventually has to be managed some other way. For now, playing makes a terrible racket :) On Saturday, April 7, 2012 7:45:32 PM UTC-4, David Nolen wrote: Fun! Would be nice

Re: I'm writing a Tempest clone in ClojureScript

2012-04-07 Thread Trevor Bentley
, you are greeted with a friendly black screen. -Trevor On Thursday, March 22, 2012 8:14:25 PM UTC-4, Trevor Bentley wrote: I'm teaching myself Clojure/ClojureScript/HTML5 via an excessively complex first project: a clone of the arcade game Tempest. I thought it might be a handy resource

I'm writing a Tempest clone in ClojureScript

2012-03-22 Thread Trevor Bentley
to work with. I was considering using it for a startup I'm working with, and this project has done nothing to dissuade me. -Trevor -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note

Re: macro question

2012-01-04 Thread Trevor
That works - thanks. Still, it seems intuitive to build the code as I had originally done. It's too bad code has to get complicated so quickly :) Thank again for the help. On Jan 3, 9:19 pm, Robert Marianski r...@marianski.com wrote: On Tue, Jan 03, 2012 at 07:22:22PM -0800, Trevor wrote: hmmm

macro question

2012-01-03 Thread Trevor
hmmm macro question: ; here's a macro that assembles many puts. It serves no purpose to me (and doesn't even make sense in its current form). It's just something I hit playing around and learning macros. (defmacro doto-putter [x y xs] `(doto (java.util.HashMap.) (.put ~x ~y)

Re: How to: convert output stream into an input stream

2011-12-16 Thread Trevor
                   ; new thread to prevent blocking deadlock     (binding [*out* (PrintWriter. pipe-out)]       (ofn var)))   pipe-in) This lets ofn run in another thread, writing its output to *out*, which passes through the pipe and becomes an input stream for ring to use. On Dec 15, 1:01 pm, Trevor tcr1

How to: convert output stream into an input stream

2011-12-15 Thread Trevor
var))} java.lang.IllegalArgumentException: No implementation of method: :make- input-stream of protocol: #'clojure.java.io/IOFactory found for class: nil Is there something special I need to do to convert output stream into an input stream ? Thanks, Trevor -- You received this message because

Re: N00b alert! - A question on immutable/mutable data structures...

2011-09-14 Thread Trevor
ahh,... I see. Thank you all - you've been very helpful. Trevor On Sep 14, 12:31 am, Stuart Campbell stu...@harto.org wrote: I knew there must be a nicer way to write that :) On 14 September 2011 16:22, Meikel Brandmeyer (kotarak) m...@kotka.de wrote: Or: (swap! user-queues

N00b alert! - A question on immutable/mutable data structures...

2011-09-13 Thread Trevor
, Trevor -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email

Re: N00b alert! - A question on immutable/mutable data structures...

2011-09-13 Thread Trevor
Thanks for the quick responses. I'll try to answer Andy's question: How do you know, in advance, that it doesn't need to handle such concurrent changes? ... and at the same time I will try to provide this example to Stuart, hoping I can see how using a map inside an atom might work: Let's say my

Re: Clojure job scheduler

2011-01-09 Thread Trevor
here:https://gist.github.com/388555 /Patrik On Jan 8, 8:37 pm, Trevor tcr1...@gmail.com wrote: Thanks, everyone for all you help. I noticed a few questions I should answer. re: email option: I really just planned on sending a gmail to indicate the job succeeded or failed. Being somewhat new

Re: Clojure job scheduler

2011-01-08 Thread Trevor
notification. But this is all somewhat beside the point. What Trevor said sounded as though the specific types of tasks he mentioned (sending emails and checking some kind of status via web app) were particularly unsuited to scheduled jobs; I was asking what it was about those tasks

Clojure job scheduler

2011-01-07 Thread Trevor
What's the best way to kick off Clojure code at scheduled times? I have some that would run once a day. Some that might run 2 or 3 times a day based upon a test being met. 1. I could write a function that sleeps an interval, check the time differential to perform a time-box triggered function,

name protect anonymous macros ?

2010-12-17 Thread Trevor
n00b questions :) 1. How do I create a function and/or a macro that accepts an unbound name and interprets that name as a symbol? example: (defn perpetuate [name args] (do-stuff-with name args) (println name)) = (perpetuate world arg1 arg2) world this may seem silly or non-idiomatic,

Re: name protect anonymous macros ?

2010-12-17 Thread Trevor
you think CL has them - because they're not useful? On Dec 17, 9:31 am, Ken Wesson kwess...@gmail.com wrote: On Fri, Dec 17, 2010 at 10:54 AM, Trevor tcr1...@gmail.com wrote: n00b questions :) 1. How do I create a function and/or a macro that accepts an unbound name and interprets that name

Re: name protect anonymous macros ?

2010-12-17 Thread Trevor
ahhh - thank you! On Dec 17, 1:23 pm, Armando Blancas armando_blan...@yahoo.com wrote: 2. I don't want to bind the name, I want to interpret the name as a symbol user= (defmacro perpetuate [name] `(let [q# (quote ~name)] (println q#) q#)) #'user/perpetuate user= (class (perpetuate

Re: name protect anonymous macros ?

2010-12-17 Thread Trevor
...@gmail.com wrote: On Fri, Dec 17, 2010 at 3:26 PM, Trevor tcr1...@gmail.com wrote: ahhh - thank you! On Dec 17, 1:23 pm, Armando Blancas armando_blan...@yahoo.com wrote: 2. I don't want to bind the name, I want to interpret the name as a symbol user= (defmacro perpetuate [name

Re: Saving the Clojure.org webiste

2009-05-19 Thread Trevor Caira
I haven't personally tried it on clojure.org, but wget -m tends to work well for this kind of task. Trevor Kei Suzuki wrote: I wanted to save the Clojure.org website so that I can read it when I'm off-line. The problem is that none of the website downloader tools I found is satisfactory

Re: list vs vector

2009-05-16 Thread Trevor Caira
that they would in any other programming language: O(1) insertion at the head, O(1) deletion, etc. Trevor On Fri, May 15, 2009 at 3:36 PM, Vagif Verdi vagif.ve...@gmail.com wrote: What are the use case scenarios where one is preferable to the other in clojure ? It looks to me like vectors almost

Re: Override the + operator for a 'struct'

2009-05-16 Thread Trevor Caira
, Trevor On May 16, 4:32 pm, Saptarshi saptarshi.g...@gmail.com wrote: Hello, I am totally new to Clojure and have dabbled in Scala. In Scala, it is possible to override the + operator ,e.g a class A can overide +. In Clojure, I would have a struct and not a class. Can I still override the + operator