Hi
I am developing an Overtone MIDI application and wish to save/read the
state of a map to an external file. The map keys are always integers,
specifically MIDI program numbers. The map values however have one of two
forms. They are either explicit association list of key/value
pairs or
While an agent is probably what you want, you should not use it like that.
I'm not sure how you can get a failed state with the given code, but here's
how I would do it.
First off, the agent is only meant for logging, so let's keep it on that
job alone. In log-entry, replace the (dosync ...)
Thanks for your response, Gary.
Just out of curiosity, what is the advantage of using the java Thread as
opposed to using the Clojure future? Will it yield the same effect or must
I use Thread to explicitly join the threads when they are done executing?
-- Dylan
On Thursday, May 15, 2014
To write the data to a file, you could do something like this:
(spit filename (pr data))
And to read it back in, you could do something like:
(clojure.edn/read-string (slurp filename))
On 15 May 2014 07:20, Steven Jones ple...@gmail.com wrote:
Hi
I am developing an Overtone MIDI
Ok, I was confused, the solution for this is just to use a session - if the
authentication is done using a cookie the server is basically stateless,
which would comply to REST.
I implemented cookie store session following this tutorial:
(ns foo.core
(foo-require foo.bar.*)
)
how to write a function to require or load file with specfic path or
namespace like above
--
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
Hello,
On Wed, Apr 23, 2014 at 4:42 AM, vrak...@gmail.com wrote:
For the purposes of academic publications
(in areas well outside of SIGPLAN and such),
are there any preferred citations for Clojure and EDN?
loosely related to this old thread, today I have read that github
has worked out a
Giovanni Gherdovich g.gherdov...@gmail.com writes:
For the purposes of academic publications
(in areas well outside of SIGPLAN and such),
are there any preferred citations for Clojure and EDN?
loosely related to this old thread, today I have read that github
has worked out a way to stick a
Dave, Mike: Noted. Will study this. Thanks!
On Wed, May 14, 2014 at 6:46 AM, Mike Haney txmikes...@gmail.com wrote:
There's a library for that - https://github.com/technomancy/robert-hooke/
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
Hi,
Am Donnerstag, 8. Mai 2014 07:41:48 UTC+2 schrieb Dylan Gleason:
*(defn- receive*
* Given a socket create a DataInputStream and process the server*
* response*
* [reader socket]*
* (let [bytes-in (make-array Byte/TYPE util/max-message-size)*
*info {:type :receive
I am trying to dump a representation of the contents of a list to file.
I've recently changed how I generated this list and it's now lazy (not really
by design more by side-effect, if you will excuse the poor choice of words).
I was using
(spit file (str lst \n))
which worked quite nicely,
Use pr-str:
user= (str (lazy-seq (list 1 2 3)))
clojure.lang.LazySeq@7861
user= (pr-str (lazy-seq (list 1 2 3)))
(1 2 3)
Cheers,
Michał
On 15 May 2014 16:29, Phillip Lord phillip.l...@newcastle.ac.uk wrote:
I am trying to dump a representation of the contents of a list to file.
I've
This is not strictly a Clojure question, but I'll ask it here since I am
solving it in Clojure. I have already made one solution which works, but I
am interested in whether there are other and better approaches.
I have a number of different products and some are dependant on others:
A - B
B -
Sorry you ran into an issue, Steve. I like your idea of including more
information in the ex-info data. Is there a specific generator you're
having trouble writing without such-that? In general, I've found that it's
a code-smell if you need such-that to retry that many times. Happy to help
A single element in the cli-options can be as brief as
[-p --port A port number]
What is non-obvious is that specifying
--port PORT
has entirely different semantics than specifying
--port
In the first case the command lein run -p 3000 will result in an options
map of {:options {:port
Cassaforte [1] is a Clojure client for Cassandra built around CQL.
Release notes:
http://blog.clojurewerkz.org/blog/2014/05/15/cassaforte-1-dot-3-0-is-released/
Next Cassaforte release will be 2.0 and will introduce a major public API
change:
I'm running Leiningen on CentOS 6.5. Everything was working fine, and today
when I try lein run it just hangs. It takes about 15 minutes for lein
version to return.
The project works fine on my macbook pro, and another CentOS box.
I deleted ~/.m2 and reinstalled Leiningen. I updated Leiningen.
Did you try to clean out ~/.lein/profiles.clj?
On Thu, May 15, 2014 at 2:34 PM, Mark Watson mkw5...@gmail.com wrote:
I'm running Leiningen on CentOS 6.5. Everything was working fine, and
today when I try lein run it just hangs. It takes about 15 minutes for
lein version to return.
The
I don't have a ~/.lein/profiles.clj file. I removed all the Leiningen
files, tried with a fresh install, still no luck.
On Thursday, May 15, 2014 2:38:34 PM UTC-4, Gary Trakhman wrote:
Did you try to clean out ~/.lein/profiles.clj?
On Thu, May 15, 2014 at 2:34 PM, Mark Watson
On May 15, 2014, at 1:03 PM, Reid Draper reiddra...@gmail.com wrote:
Sorry you ran into an issue, Steve. I like your idea of including more
information in the ex-info data. Is there a specific generator you're having
trouble writing without such-that? In general, I've found that it's a
try removing ~/.m2
On 15 May 2014, at 20:56, Mark Watson mkw5...@gmail.com wrote:
I don't have a ~/.lein/profiles.clj file. I removed all the Leiningen files,
tried with a fresh install, still no luck.
On Thursday, May 15, 2014 2:38:34 PM UTC-4, Gary Trakhman wrote:
Did you try to
Tried it
On Thursday, May 15, 2014 3:17:58 PM UTC-4, Magomimmo wrote:
try removing ~/.m2
On 15 May 2014, at 20:56, Mark Watson mkw...@gmail.com javascript:
wrote:
I don't have a ~/.lein/profiles.clj file. I removed all the Leiningen
files, tried with a fresh install, still no luck.
Thanks, edn looks like the way to go but your example is not quite
working. The issue appears to be with pr.
(defn foo [] 'foo)
(def data {0 foo,
1 '[a b c]})
(spit filename (pr data))
First pr prints the data to *out* but then returns nil so spit is writing
an empty file.
Second
At this point, I'd suspect a networking timeout issue, do you get a
different result if you disable all your connections?
On Thu, May 15, 2014 at 3:31 PM, Mark Watson mkw5...@gmail.com wrote:
Tried it
On Thursday, May 15, 2014 3:17:58 PM UTC-4, Magomimmo wrote:
try removing ~/.m2
On 15
I've had this problem and I suspect is low memory. It happened often with
an old box with 1G running Fedora 20, but I've also seen it with my laptop
if I leave too many leftover jvm processes running (with 4G allocated for a
virtual box instance); on my 16G mac it never happens. So freeing up
Oh yea, GC churn can take up a lot of time. The illusion of 'infinite
memory' :-).
On Thu, May 15, 2014 at 3:47 PM, Armando Blancas abm221...@gmail.comwrote:
I've had this problem and I suspect is low memory. It happened often with
an old box with 1G running Fedora 20, but I've also seen it
On May 15, 2014, at 3:35 PM, Steven Jones ple...@gmail.com wrote:
Thanks, edn looks like the way to go but your example is not quite
working. The issue appears to be with pr.
(defn foo [] 'foo)
(def data {0 foo,
1 '[a b c]})
(spit filename (pr data))
Use pr-str instead of
You said b can't be billed after B. But it sounds like it can't be billed
before.
Say b is ready at 1, can you bill it at 1 and then B at 2?
Anyway, my first thought was using weights on the edges equal to the duration
between the dependencies and use a max cost on the graph. But calculating
If, say C cannot depend on any b directly, (I.e. C can only depend on B), and
your domain rules say you can only bill for all b's when you bill B, then
really you have a self contained sub-graph with only one bill date for the root
node B.
You can simply ignore backfilling the billing date for
I'm not sure I totally understand your use case, but somehow it sounds
like these libraries may be of interest to you:
propaganda https://github.com/tgk/propaganda
prismatic graph https://github.com/prismatic/plumbing
--
You received this message because you are subscribed to the Google
Groups
On Thursday, May 15, 2014 11:18:31 PM UTC+2, David Pidcock wrote:
You said b can't be billed after B. But it sounds like it can't be billed
before.
Say b is ready at 1, can you bill it at 1 and then B at 2?
They should actually be billed at the same time (yeah, I didn't explain
that very
Yeah maybe, but both b and B should basically be billed at max of their
associated dates, which might affect the things that depend on B. So I
don't think b can be dropped completely.
On Thursday, May 15, 2014 11:30:35 PM UTC+2, David Pidcock wrote:
If, say C cannot depend on any b directly,
Nice thanks, I didn't know propaganda. I am not sure if it applies to this
problem, but it looks interesting so I'll have a look.
On Friday, May 16, 2014 12:10:29 AM UTC+2, François Rey wrote:
I'm not sure I totally understand your use case, but somehow it sounds
like these libraries may be
Hi,
* background:
* I have clojurescript + lein cljsbuild auto working perfectly fine.
* I have source maps working (when I click on a file in Chrome, it
jumps me to the corresponding *.cljs file)
* problem I am facing:
* I like to name my modules:
foo/public.cljs
Thanks that gives me a few options. I am leaning towards the latter
approach of registering the functions somewhere and then serializing the
information needed to retrieve them.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
35 matches
Mail list logo