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 >

[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 -- -- Y

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

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 tagge

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, i

Re: I'm writing a Tempest clone in ClojureScript

2012-04-07 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
d if you beat the 7th, 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'm writing a Tempest clone in ClojureScript

2012-03-22 Thread Trevor Bentley
has been surprisingly solid and easy 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

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 wrote: > On Tue, Jan 03, 2012 at 07:22:22PM -0800, Trevor wrote: > >

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
ut)] > >       (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 wrote: > > > > I

How to: convert output stream into an input stream

2011-12-15 Thread Trevor
body (input-stream (ofn 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 receiv

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 wrote: > I knew there must be a nicer way to write that :) > > On 14 September 2011 16:22, Meikel Brandmeyer (kotarak) wrote: > > > > > > > > > Or: >

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 m

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

2011-09-13 Thread Trevor
mixed operations. Thanks, 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 unsu

Re: Clojure job scheduler

2011-01-09 Thread Trevor
> Code example here:https://gist.github.com/388555 > > /Patrik > > On Jan 8, 8:37 pm, Trevor 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 indicat

Re: Clojure job scheduler

2011-01-08 Thread Trevor
g for background tasks > > is really nice because you don't have to remember to check > > some log file or other task-specific status indicator periodically (which > > has burned me in the past). > > Well, both Windows and MacOS have variations on the nifty concept of

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, but

Re: name protect & anonymous macros ?

2010-12-17 Thread Trevor
c 17, 1:35 pm, Ken Wesson wrote: > On Fri, Dec 17, 2010 at 3:26 PM, Trevor wrote: > > ahhh - thank you! > > > On Dec 17, 1:23 pm, Armando Blancas wrote: > >> > 2. I don't want to bind the name, I want to interpret the name as a > >> > symbol > > >

Re: name protect & anonymous macros ?

2010-12-17 Thread Trevor
ahhh - thank you! On Dec 17, 1:23 pm, Armando Blancas 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 somename)) > somename

Re: name protect & anonymous macros ?

2010-12-17 Thread Trevor
ct. In your example: (defn bar [x] (do-something-with (symbol x))) user=> (bar "quux") ; whatever You're not passing in an unbound name, which is the whole point - otherwise I might as well just pass in a symbol. On Dec 17, 11:31 am, Ken Wesson wrote: > On Fri, De

Re: name protect & anonymous macros ?

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

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, b

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 fo

Re: Override the + operator for a 'struct'

2009-05-16 Thread Trevor Caira
lex-numbers. Best, Trevor On May 16, 4:32 pm, Saptarshi 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 > o

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 wrote: > > What are the use case scenarios where one is preferable to the other > in clojure ? > > It looks to me like vectors al