If the value is something easy to compute, like a backreference in a tree,
and you only need it while walking, why bother to store it at all?
Especially if you're going to need to use mutable state, which will make
your whole tree less useful for all kinds of things. Here's an example, in
which
On Friday, July 6, 2012 8:16:11 PM UTC+2, Sean Corfield wrote:
>
> def and defn are for top-level definitions. let is for local definitions.
>
> Specifically def and defn create a Var in the current namespace bound
> to the specified value (or function), whereas let creates a lexically
> scope
Hi, Phil:
Thanks for your detailed analysis.
My use-case is I have a tree and want to walk over the tree and apply a
function on the nodes. The operation of the function also depends on the
parent and children of the node, so it will be nice if each node already
contains the references to its
On Thursday, July 5, 2012 at 9:05 PM, Leif wrote:
> I know this doesn't answer your question, but why are you contemplating using
> Jade in Clojure, instead of Hiccup or Enlive, which seem like better markup
> solutions (for different reasons)? Is it just for the sake of uniformity
> throughout
Thanks for the quick turnaround on this release, Stuart!
I just pushed out [lein-cljsbuild "0.2.4"], which will pull in the new
0.0-1443 release.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegro
I am also a newbie at clojure and wanted to share that I have found the
http://www.4clojure.com/ site to be helpful. You are presented with a
problem set for which you provide a solution. If you get it wrong it tells
you and you try again. If you get it right you move on to another set.
The
On Fri, Jul 6, 2012 at 3:01 PM, Jamie wrote:
> Here's another clojure.core.logic relation. This time for
>
> http://api.stlouisfed.org/docs/fred/series_observations.html
>
> https://gist.github.com/3062006
>
> Example:
>
> The dates and rates of the US 10-year Treasury note when the rates wer
Here's another clojure.core.logic relation. This time for
http://api.stlouisfed.org/docs/fred/series_observations.html
https://gist.github.com/3062006
Example:
The dates and rates of the US 10-year Treasury note when the rates were
less than they were on Monday.
(clojure.pprint/pprint (s
You basically have two choices.
Choice 1, give names to each of your nodes, and link names to names.
(def cycle {:a {:value 2, :link :b}, :b {:value 3, :link :a}}
Choice 2, use one of Clojure's reference types
(def a (ref {:value 2}))
(def b (ref {:value 3}))
(dosync (alter a assoc :link b) (alte
On Fri, Jul 6, 2012 at 1:55 AM, Jacobo Polavieja
wrote:
> I know this is going very offtopic, but why did you use "let" define
> "in-matrix?" instead of a defn?
def and defn are for top-level definitions. let is for local definitions.
Specifically def and defn create a Var in the current namespa
Leiningen-style dependency: [org.clojure/clojurescript 0.0-1443]
Changes: http://build.clojure.org/job/clojurescript-release/14/
JAR-ness:
http://search.maven.org/#artifactdetails%7Corg.clojure%7Cclojurescript%7C0.0-1443%7Cjar
--
You received this message because you are subscribed to the Goog
On 6 July 2012 15:42, Warren Lynn wrote:
> Can someone help me figure out how I can have two data structures to refer
> to each other in functional programing style? I mean something like double
> linked list, or in a tree where each node keeps a reference to its parent
> and children. What puzzle
On Friday, July 6, 2012 11:20:15 AM UTC-5, David Nolen wrote:
Wow very cool, do you have some example queries that you're using?
David,
Wish we did. Unfortunately, nothing concise.
We've got a few other rough relations, and we'd like to put together some
good examples that use them together
On Fri, Jul 6, 2012 at 10:16 AM, Jamie wrote:
> Core.logic is great. Here's a trivial 10-line core.logic relation backed by
> a Lucene index. Simple and useful (at least to us). Need a library of such
> things.
>
> Comments and improvements appreciated.
>
> Details at https://gist.github.com/30
On Fri, Jul 6, 2012 at 5:22 PM, grahamke wrote:
> (.start (Thread. (println "I ran!") "tName"))
You're missing a # here. You create a new thread object passing two
args to the Thread constructor: The return value of (println ...) and
"tName". println returns nil, so you effectively do (Thread. ni
Hi,
I was experimenting with examples from Stu's Programming Clojure book and
I'm puzzled why these two function behave differently when run in the repl:
(.start (Thread. (println "I ran!") "tName"))
(.start (Thread.
(proxy [Runnable] [] (run [] (println "I ran!"))) "tName"))
The fi
I believe there is a mechanism in JBoss for sharing dependencies by
creating modules for them and installing them in the server itself, but
if you have more than one or two, it's probably more trouble than it's
worth.
Alternatively, you might consider turning your apps into libraries,
forming a si
Murtaza:
Technically it may be possible. The first naive approach that comes to mind is
a classloader per dependency that would be specific to the particular version
of the dependency an application needs (the version is needed because the other
applications could require a different version of
Sounds like we need one ticket with a minimal case and another one
which points out the revision where stacktraces disappeared for you.
David
On Fri, Jul 6, 2012 at 3:12 AM, kovas boguta wrote:
> On Fri, Jul 6, 2012 at 2:59 AM, David Nolen wrote:
>> On Fri, Jul 6, 2012 at 2:43 AM, kovas boguta
Murtaza:
On Jul 6, 2012, at 7:01 AM, Murtaza Husain wrote:
> Three requests -
> (msg/respond "/queue/work" (partial apply *) :selector "operation='multiply'")
> 1) Can the topic and queue be expressed as :queue/work or :topic/work, like
> datomic style ?
That would be trivial to implement. Can
Can someone help me figure out how I can have two data structures to refer
to each other in functional programing style? I mean something like double
linked list, or in a tree where each node keeps a reference to its parent
and children. What puzzles me is, as soon as you update the reference in
Core.logic is great. Here's a trivial 10-line core.logic relation backed
by a Lucene index. Simple and useful (at least to us). Need a library of
such things.
Comments and improvements appreciated.
Details at https://gist.github.com/3060305 .
The gist of the gist is:
;; Generate the Lucene
Toby,
Most of my apps have almost similar dependencies, anyway those can be
shared between runtimes ?
Murtaza
On Friday, July 6, 2012 5:12:50 PM UTC+5:30, Toby Crawley wrote:
>
> Murtazza:
>
> The memory cost of the isolated runtimes is much lower than a JVM per app
> since we don't duplicate
Hi,
using the reducers library also eliminates the per-step allocation of
temporary results when the processing code is composed of multiple
functions, AFAIK.
Las
2012/7/4 Balint Erdi
> Hey,
>
> AFAIK the clojure reducers library gains its performance boost since the
> underlying JVM can make
Reading through your code, many of your functions have large cond or
condp clauses. Sometimes those can be replaced with multimethods. They
let you define all the options to a choice as separate functions, and
add extra choices later without touching the rest of your code. At the
same time, they ad
> Whenever Clojure/core team members attend conferences or teach courses, we
> usually bring a stash of Clojure stickers.
That does not satisfy us. We want our MTV! :)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
Hey Sam,
Have you got any Quil/Overtone examples for us to look at? Know of any
projects that have used this yet?
On Tuesday, June 26, 2012 1:31:28 PM UTC-7, Sam Aaron wrote:
>
> Hi all,
>
> I just thought I'd give you a quick heads up that Overtone 0.7 has been
> released. It represents around
Hey,
AFAIK the clojure reducers library gains its performance boost since the
underlying JVM can make use of multiple cores. I wonder how this changes
with Javascript being the platform. Don't JS engines have a single
execution thread?
Balint
On Thursday, June 28, 2012 11:47:46 PM UTC+2, Davi
I agree.
Major GC always means "pause" in application execution. This will
definitely hurt overall throughput & latency.
I think the goals of optimizing GC is to
1. reduce # of Major GC as much as possible;
2. reduce frequency of Minor GC as much as possible;
In order to achieve Goal #1, appli
HI Daniel,
I'm interested in Clojure and I would like to meet some Clojurians in
Prague too!
Ed
On Friday, June 29, 2012 12:21:58 PM UTC+2, Daniel Skarda wrote:
>
> Hi,
>
> are there fellow Clojurians from Prague, Czech Republic using Clojure to
> attack real problems?
> I started with Clojure
Hello all,
Clojure n00b here. As a means of learning Clojure, I wrote a little
Mustache templating code. (I do realize Clojure libraries for this exist
already.)
The last time I wrote any Lisp was a decade ago, so any general advice
would be appreciated. Here's the gist:
https://gist.github.co
Whenever Clojure/core team members attend conferences or teach courses, we
usually bring a stash of Clojure stickers.
-S
On Saturday, June 9, 2012 9:03:46 PM UTC-4, aboy021 wrote:
>
> Is there anywhere that I can get a Clojure sticker?
--
You received this message because you are subscribed to
+1. Can it be shipped to China?
On Thu, Jul 5, 2012 at 9:40 AM, David Della Costa wrote:
> +1, wants sticker.
>
> 2012/7/4 Eric Scrivner :
> > +1 I was just looking for this the other day and was disappointed to
> find I
> > could only get a t-shirt.
> >
> >
> > On Saturday, June 9, 2012 6:03:46
+1 !
On Thu, Jul 5, 2012 at 9:43 AM, Dima Sabanin wrote:
> +1 here too.
>
> On Thu, Jul 5, 2012 at 9:40 AM, David Della Costa
> wrote:
> > +1, wants sticker.
> >
> > 2012/7/4 Eric Scrivner :
> >> +1 I was just looking for this the other day and was disappointed to
> find I
> >> could only get a
+1 I want me a sticker too, I saw one on your simple made easy presentation
on the back of your macbook.
On Thursday, July 5, 2012 7:43:24 AM UTC-7, Dima Sabanin wrote:
>
> +1 here too.
>
> On Thu, Jul 5, 2012 at 9:40 AM, David Della Costa
> wrote:
> > +1, wants sticker.
> >
> > 2012/7/4 Er
+1... please...
On Friday, 6 July 2012 10:09:29 UTC+1, dmirylenka wrote:
>
> +1
>
> On Sunday, June 10, 2012 3:03:46 AM UTC+2, aboy021 wrote:
>>
>> Is there anywhere that I can get a Clojure sticker?
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group
Murtazza:
The memory cost of the isolated runtimes is much lower than a JVM per app since
we don't duplicate every class. Anything loaded by the system class loader
(java.*, javax.*, etc) and any java classes needed by Immutant itself are not
duplicated - only classes loaded from the app's depe
Hi Jim,
Congratulations on 0.2, and the new messaging API is beautiful.
Three requests -
(msg/respond "/queue/work" (partial apply *) :selector "operation='multiply'")
1) Can the topic and queue be expressed as :queue/work or :topic/work, like
datomic style ?
2) Can the message {"operation"
On Friday, July 6, 2012 10:55:24 AM UTC+2, Jacobo Polavieja wrote:
>
> It may be due to my background, but that I understand or feel a lot better
> :). I suppose as time passes and I see more and more Clojure code that will
> change anyway.
>
> I know this is going very offtopic, but why did yo
+1
On Sunday, June 10, 2012 3:03:46 AM UTC+2, aboy021 wrote:
>
> Is there anywhere that I can get a Clojure sticker?
--
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 ne
On Friday, July 6, 2012 2:50:00 AM UTC+2, Benny Tsai wrote:
>
> Indeed! You can use ->> (like ->, but inserts into the last position of
> each form) to do something like:
>
> (defn neighbors
> ([size yx]
> (neighbors [[-1 0] [1 0] [0 -1] [0 1]] size yx))
> ([deltas size yx]
> (let [
Typically:
if you have java interop: you need to separate this and provide cljs
substitutes. these will be none crossover files.
if you have macros: you need to separate them and move to a macros file.
crossovers copy the clj to cljs. this will work but not for macros and non
portable (i.e. in
On Fri, Jul 6, 2012 at 2:59 AM, David Nolen wrote:
> On Fri, Jul 6, 2012 at 2:43 AM, kovas boguta wrote:
>> For instance the protocol in the namespace that I forget to quality
>> doesn't get recognized:
>> WARNING: Symbol mvc/IMVC is not a protocol at line 38
>> src/cljs/client/subsession.cljs
>>
43 matches
Mail list logo