The -cp flag should be passed a colon-separated list of entires to search
for dependency code. Each entry in the list can be either a directory (in
which case the contents of the directory must immediately contain Java or
Clojure source files) or a JAR file. So the command you’re currently using
vim-fireplace lets you compile individual S-expressions into an existing
nREPL (one in which the rest of your code is typically also loaded and
available), so I typically make all my code changes right in the editor
against the actual file I'm working on. Then I just compile the function
I'm
I always assumed it was because vectors have similar properties to the
classic java.util.Vector: they’re variable-length, contain heterogenous
objects accessible by integer index, and safe for concurrent access from
multiple threads:
http://docs.oracle.com/javase/7/docs/api/java/util/Vector.html
On Tue, Jun 2, 2015 at 3:17 AM, Christopher Small metasoar...@gmail.com
wrote:
Additionally, I feel it worth responding to some of Timothy's comments
about the difficulty of getting a core.async centric API right. While I
agree that in general (and particular with more complicated APIs) getting
Oh, so the events are for all intents and purposes infinite?
On Tue, Jun 2, 2015 at 11:10 AM, Christopher Small metasoar...@gmail.com
wrote:
@Erik: I should clarify in this situation, the _user_ of the API would
decide whether they want to stop listening to events. So there's not so
much that
On Thu, May 14, 2015 at 12:14 PM, Sean Corfield s...@corfield.org wrote:
In an environment where you can’t trust your co-workers(!), you certainly
want to hide *mutable* data so they can’t modify your objects’ state. When
you remove mutability, there’s a lot less damage they can do and they
(get the char at index 4)
\c
e
On Wed, May 13, 2015 at 9:55 PM, Sam Raker sam.ra...@gmail.com wrote:
I always assumed (contains? foo 2) worked because strings are arrays
(i.e. vectors) of characters, on some level.
--
You received this message because you are subscribed to the Google
These are cool too:
https://github.com/frankhale/hello-atom-shell
https://github.com/oakmac/cuttle/
e
On Tue, Apr 7, 2015 at 8:03 AM, JPatrick Davenport virmu...@gmail.com
wrote:
Well don't that beat all? Thanks. It looks good.
If anyone else wants to add something, please do.
On
There is no best approach for this. Yes, you do end up blocking the request
thread, but that’s what needs to happen if you the response requires the
value returned by the channel. You can’t return a response to the browser
and then change it later when the channel sends its value. (You’d have the
Another way to structure this problem is as sequences:
1. Start with a sequence of tables. (show-tables db-spec)
2. Filter down to only the tables you care about. (filter my-pred
tables-seq)
3. Take only the first of these. (take 1 filtered-tables-seq)
4. If there is a table, do
We tried Korma but found it too limiting for our needs. Later, I saw this
tweet:
https://twitter.com/ibdknox/status/557236505639665664
We are currently using HoneySQL to generate SQL which then gets passed to
clojure.java.jdbc.
e
On Tue, Feb 24, 2015 at 9:04 AM, Colin Yates
Vim Fireplace https://github.com/tpope/vim-fireplace supports Ctrl-c
without killing its REPL host. Highly recommended if you are a Vim user.
e
On Sat, Feb 21, 2015 at 7:32 AM, Shawn Rasheed unsh...@gmail.com wrote:
If it's the clojure repl this might work:
(let [out (async/chan 0 (map inc))]
(async/pipe in out)
out)
Earlier in your email you mention printing, however. If you have I/O to
perform (like printing), I’m told that you don’t want to do it in a
transducer. You can use pipeline-async for this instead:
(defn f [v ch]
(async/go
Yes, the producer’s put will block until the consumer takes, but doesn’t
this still involve an eager initial request (so that the producer will have
something to put in the first place, so that it can block)?
e
On Mon, Feb 16, 2015 at 5:52 PM, janpaulbultm...@googlemail.com wrote:
Make the
Many functions that affect keyed collections will work on vectors if you
supply the numeric index as a key.
e
On Monday, January 26, 2015, Josh Stratton strattonbra...@gmail.com wrote:
I'm new to clojure and FP in general. One thing that has always been a
little confusing for me is working
Not sure if it’s “proper”, but you could just alts! twice on all three
channels:
(let [[_ p1] (alts! [player1-ch player2-ch timeout-ch])
[_ p2] (alts! [player1-ch player2-ch timeout-ch])]
(cond
(= p1 timeout-ch) No players played.
(= p2 timeout-ch) (str p1 played, and the other
Howdy,
I see that the ThreadFactory used by clojure.core.async/thread‘s Executor
accepts a daemon parameter, to specify whether the threads are daemon or
not. But from reading the source, I don’t see any obvious way to specify
this for individual calls to clojure.core.async/thread. Is it
((fn [x] (* 5 x)) 5)
is the same as
(def my-function
(fn [x] (* 5 x)))
(my-function 5)
On Fri, Jan 2, 2015 at 8:13 PM, novato biofob...@gmail.com wrote:
I choose clojure as my first programming language after some research. I
am learning by doing Clojure Koans http://clojurekoans.com/
;(async/timeout (* 10 1000)) ;; not sure why this doesn’t work here, would
make it portable to clojureScript I think
Did you forget to use ! on that line?
e
On Fri, Jan 2, 2015 at 11:04 AM, Thomas th.vanderv...@gmail.com wrote:
Happy New to all of you!!!
Recently I came across the
Note that there is precedent for this in clojure.string/blank?
http://clojuredocs.org/clojure.string/blank_q.
On Wed, Dec 24, 2014 at 7:58 AM, Andrey Antukh n...@niwi.be wrote:
Hi!
Thank you very much!
You are right about nil handling, it should be documented and proper
handled.
But
Part of what makes core.async great is that you don't have to use atoms to
communicate between threads in every case. For your case, I don't see what
using an atom gets you. It seems like you could replace the atom with a
channel, and put values on the channel whenever mail is sent. Your code
will
)
(recur)
(apply f args)))
will allow the go-loop to return when the channel is closed.
On Monday, December 1, 2014 8:33:10 PM UTC-5, Erik Price wrote:
Coincidentally, we recently wrote code to do something very similar. The
following function will invoke f after
On Tue, Dec 2, 2014 at 12:22 PM, Brian Craft craft.br...@gmail.com wrote:
It does seem like a single-thread solution would be better, not creating
so many futures. Polling seems pretty crude, but I don't see another way of
doing it with clojure abstractions. Maybe a pure java solution.
Coincidentally, we recently wrote code to do something very similar. The
following function will invoke f after period milliseconds, unless a value
is sent on events-ch, in which case the timeout is reset (and starts
counting down again):
(defn invoke-after-uninterrupted-delay
([period
What kind of naming convention is appropriate for a function that
operates on a sequence, and, as one of its return values, returns a
new head for (or in other words a subsequence within) that sequence?
For example, a function that consumes some portion of a stream. Or is
it not conventional for a
On Sun, Jan 31, 2010 at 10:33 PM, Barry Dahlberg
barry.dahlb...@gmail.com wrote:
Perhaps I'll write up my findings once the language stops intimidating
me.
At the moment I'm writing an account object. I have some standard
CRUD type functions which operate on a map behind the scenes. I would
Thanks Sean, this was a great exercise. I'm comfortable reading
Clojure code, but writing it requires thinking differently from what I
am used to. My solution is clunky and less elegant than most of the
other submissions in this thread, but I avoided reading any of them
until I had implemented the
On Jan 20, 7:22 pm, CuppoJava patrickli_2...@hotmail.com wrote:
Some articles I read point to Java's use of garbage collection as the
culprit, and I'm wondering whether that is true. I know Scheme and
Common Lisp also use garbage collection, so do gui programs written
those languages also
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
thirdreplica...@gmail.com wrote:
Hi,
Can you guys recommend any good books, articles or code on
concurrency? I'm new to concurrency issues, and just finished the
Halloway book, so it would be great to have an introductory reference
with lots
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
thirdreplica...@gmail.com wrote:
Can you guys recommend any good books, articles or code on
concurrency? I'm new to concurrency issues, and just finished the
Halloway book, so it would be great to have an introductory reference
with lots of
Personally, I don't think the problem for non-Lispers is with the
number of parentheses so much as with the *depth* of parens-nesting
and having to invert the reading order, starting from the deepest
s-expr and reading your way back out.
I'm still very new to Clojure (basically I have only been
On Thu, Dec 17, 2009 at 12:16 PM, Konrad Hinsen
konrad.hin...@fastmail.net wrote:
On 17 Dec 2009, at 15:44, Sean Devlin wrote:
(defn map-vals [f coll]
(into {} (map (juxt key (comp f val)) coll))
vs:
(defmethod fmap clojure.lang.IPersistentMap
[f m]
(into (empty m) (for [[k v] m]
On Fri, Dec 11, 2009 at 12:15 PM, rebcabin bc.beck...@gmail.com wrote:
Any hints for me? I'm sure it's because I really don't know at all how
to find out where java things are installed and how to refer to them
if they're installed in weird places yadda yadda.
Are the Java 3D jar files in
On Wed, Dec 2, 2009 at 10:10 AM, Stefan Kamphausen
ska2...@googlemail.comwrote:
OK, the doc of contains? told me that for indexed collection-types it
will only check, whether the index is within the valid range. So
maybe:
user (contains? (list 1 2 3) 1)
false
At that point I dived into
34 matches
Mail list logo