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
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
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:
>
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
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
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)
~@(
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:
> >
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
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
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
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
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
>
> >
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
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
> 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
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
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
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
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
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
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
>
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
> 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
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
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
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
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
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
28 matches
Mail list logo