(this is not a question about recur)
Suppose I have:
(defn v1
([x] (v1 x []))
([x r] (conj r x)))
and I decide to make v2 - for whatever reason - say I think I have a better
implementation for part of it
so I start with a copy and edit:
(defn v2
([x] (v1 x []))
([x r] (conj r
1. would it be, or is it possible to have something generic like this?
You could use:
(def v1 (fn self
([x] (self x []))
([x r] (conj r x)))
2. What about anonymous fns?
The same idea, just without the def.
(fn call-self
([x] (call-self x 0))
([x y] ...)))
--
You received this
You might want to look at the Y Combinator for this.
Regards,
BG
On Mon, Aug 6, 2012 at 11:36 AM, Dave Sann daves...@gmail.com wrote:
(this is not a question about recur)
Suppose I have:
(defn v1
([x] (v1 x []))
([x r] (conj r x)))
and I decide to make v2 - for whatever reason -
I didn't know you could name functions made with fn like that. nice.
It would be a handy feature for defn to have maybe...
On Monday, 6 August 2012 16:16:06 UTC+10, Carlo wrote:
1. would it be, or is it possible to have something generic like this?
You could use:
(def v1 (fn self
It would also be a useful ability in multimethods...
On Monday, 6 August 2012 16:33:15 UTC+10, Dave Sann wrote:
I didn't know you could name functions made with fn like that. nice.
It would be a handy feature for defn to have maybe...
On Monday, 6 August 2012 16:16:06 UTC+10, Carlo wrote:
Hello,
Some single element project values (String) have been enhanced to
muli-element values (vector of Strings).
Check all your *-paths keys :
:source-paths
:resource-paths
:test-paths
Etc.
HTH,
Laurent
Le 5 août 2012 à 03:42, Pierre-Henry Perret phper...@gmail.com a écrit :
Running a
Thanks,
The problems is solved (see other thread on same subject)
Le lundi 6 août 2012 09:18:18 UTC+2, lpetit a écrit :
Hello,
Some single element project values (String) have been enhanced to
muli-element values (vector of Strings).
Check all your *-paths keys :
:source-paths
Problem solved, Thanks all
Le dimanche 5 août 2012 10:32:14 UTC+2, Pierre-Henry Perret a écrit :
Sean,
It works now.. !
I have at last precated th lein1 project.
You'll see in the code a *file:// *url that is particular to my current
checkout version, by default *development *.
Any
Just throwing in my vote here (assuming anyone's keeping count): I agree
with Mark that the current behavior is surprising and disagreeable.
And while there's clearly a practical argument to be made from both
perspectives, my own feeling is that throwing a hard runtime exception here
is
I cannibalized most of the old contrib profiling stuff for Timbre,
btw: https://github.com/ptaoussanis/timbre#profiling
- Peter Taoussanis (@ptaoussanis)
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
(defn recurse [f] (fn [ args] (apply f (recurse f) args)))
(def fac
(recurse (fn [self n]
(if (zero? n)
1
(* n (self (dec n)))
There is a performance cost. recursive can be specialised on different
number of arguments, to reduce
this cost.
My answer to this is: everything is an implementation at some level. So do
you think we need factory functions of factory functions, and factory
functions of factory functions of factory functions? I am sure that will be
more flexible than just one level of factory functions.
We already have
Fwiw, inc on what Marc said
Le 6 août 2012 à 10:39, Peter Taoussanis ptaoussa...@gmail.com a écrit :
Just throwing in my vote here (assuming anyone's keeping count): I agree
with Mark that the current behavior is surprising and disagreeable.
And while there's clearly a practical argument to
Adding complexity to a language on the basis that it fits your perception on
what is easier to read while there is already another alternative covering
several other
use cases is the central issue here.
My reluctance (or allergy as you may suggest) about OOP is toward the popular
That's amazing ;-)
Granville
On 5 August 2012 19:11, Sam Aaron samaa...@gmail.com wrote:
On 4 Aug 2012, at 17:23, Tom Maynard tom.w...@gmail.com wrote:
Bravo! Standing ovation. Technical difficulties be d*mned, that was a
spectacular exhibition. I was reminded of a live premiere
Hi all,
I'm trying to get simple ClojureScript application to work.
I have a simple protocol Map here:
https://github.com/piranha/cj-locations/blob/master/src/map.cljs
And an implementation of it here (I tried with extend-type as well):
I am using Storm which is based on Clojure. while emitting a map which has
keywords as keys we get the following exception. When we have strings as keys
we dont get this exception. Sounds like serialization problem. I have also
checked the source of LispReader it should have : as a valid token.
@odyssomay, @Luc thanks very much. That explains the problems I was having
@Peter, timbre looks very interesting. Thanks for posting it
On Monday, 6 August 2012 10:08:19 UTC+1, Peter Taoussanis wrote:
I cannibalized most of the old contrib profiling stuff for Timbre, btw:
FYI, the results from the 2012 State of Clojure survey are now
available (with a kitten…seriously!):
http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/
Thanks to everyone that participated,
- Chas
On Jul 25, 7:39 pm, Chas Emerick c...@cemerick.com wrote:
Just a
I'm surprised you didn't post your question on the Financial Neural
Networks section of the forum but on the Using encog in Java instead!
You did see it right?
Just trying to help here... :-) . I'm genuinely interested in your
problem and I'd love to see the solution unfold! In fact if you
You are attempting to serialize the empty keyword. The empty string, , is
fine to store, but : is not. You will get the same error from (read-string
:).
On Monday, August 6, 2012 4:55:23 AM UTC-7, 4m1r wrote:
I am using Storm which is based on Clojure. while emitting a map which has
lein-expectations - the plugin for running Jay Fields' awesome
Expectations testing library - has been updated for Leiningen 2.0.
If you are using Leiningen 1.x, continue to use lein-expectations 0.0.5.
If you are on Leiningen 2.x, you should use lein-expectations 0.0.7 so
that exit on test
Links ?
Le 6 août 2012 à 20:43, Sean Corfield seancorfi...@gmail.com a écrit :
lein-expectations - the plugin for running Jay Fields' awesome
Expectations testing library - has been updated for Leiningen 2.0.
If you are using Leiningen 1.x, continue to use lein-expectations 0.0.5.
If you
On Mon, Aug 6, 2012 at 12:01 PM, Laurent PETIT laurent.pe...@gmail.com wrote:
Links ?
https://clojars.org/lein-expectations
https://github.com/gar3thjon3s/lein-expectations
Le 6 août 2012 à 20:43, Sean Corfield seancorfi...@gmail.com a écrit :
lein-expectations - the plugin for running Jay
We already have them. They are just functions.
(And I think thinking in term of factory functions does not make sense.
Every pure function takes something and makes something out of it)
The construction of data from data is best taken care by functions.
That way you don't expose more
Spyglass (http://clojurememcached.info) is a small and very fast Clojure client
for Memcached that can also be used
with Couchbase Server and Kestrel. Spyglass is built on top of SpyMemcached, a
mature battled tested
Memcached client.
What can you do with Spyglass?
* Perform sync and async
Warren Lynn wrn.l...@gmail.com writes:
If you say constructor is bad because it is not flexible, where bad
means we should not do it at all, then what makes you think one-level
factory function good? Isn't two-level factory function even more
flexible? Then isn't three-level
caution! logic noob question following...why does the following fail?
can anyone help with this? the stack trace is not very helpful!
(defn bishop-moves [x y]
(let [xmax 8 ymax 8]
(run* [q]
(fresh [a b]
( a xmax)
( b ymax)
(= (Math/abs (- x a))
Thanks,
sorry for the short email, it was sent from smartphone
2012/8/6 Sean Corfield seancorfi...@gmail.com
On Mon, Aug 6, 2012 at 12:01 PM, Laurent PETIT laurent.pe...@gmail.com
wrote:
Links ?
https://clojars.org/lein-expectations
https://github.com/gar3thjon3s/lein-expectations
Le
Wow Expectations wasn't in my radar, thanks for helping me fix this, since
it looks like a really useful and featureful test library.
I love the way it clearly has a path to JUnit integration which should
really help leverage existing IDEs possibilities in this area.
Makes me think again on
Hey Jim,
Yes, that was actually the first place I was going to post the question.
But what I noticed, was that the Financial Neural
Networkhttp://www.heatonresearch.com/neural-network-forums/financial-neural-networks
section, was geared more towards users of financial software, rather than
On Mon, Aug 6, 2012 at 7:21 AM, Chas Emerick c...@cemerick.com wrote:
FYI, the results from the 2012 State of Clojure survey are now
available (with a kitten…seriously!):
http://cemerick.com/2012/08/06/results-of-the-2012-state-of-clojure-survey/
Thanks for taking the time to do this. There's
I am a core.logic noob as well, but I think David Nolen talked about this
in a presentation that you can watch at:
http://vimeo.com/46163091
He will start talking about what I think you are interested in at about 12
minutes and 20 seconds into the presentation.
By the way, if I grow my hair
On Monday, August 6, 2012 3:06:47 PM UTC-4, Sean Corfield wrote:
On Mon, Aug 6, 2012 at 12:01 PM, Laurent PETIT wrote:
Links ?
https://clojars.org/lein-expectations
https://github.com/gar3thjon3s/lein-expectations
Maybe list this at
On Mon, Aug 6, 2012 at 6:01 PM, John Gabriele jmg3...@gmail.com wrote:
Maybe list this at https://github.com/technomancy/leiningen/wiki/Plugins ?
Done. I didn't know it wasn't already there!
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. --
Great stuff!
I'm trying to use this functionality to deploy a library using
Maven/Eclipse Juno on Windows and keep getting a timeout (but interestingly
the jar and pom do make it up there) - see this SO question :
My reluctance (or allergy as you may suggest) about OOP is toward the
popular
implementations that are insanely verbose.
Why is it insanely verbose? Just look at my example:
(defrecord MyRecord [x y z]
(make-record [arg1 arg2 arg3 ...] ...))
(make-record MyRecord arg1 arg2 arg3 ...)
Have you diagnose any malformations ?
I'm somewwhat expectative with *lein / 2 *paradigm
Notably that response to * lein2 repl * *Exception in thread main
java.io.FileNotFoundException: -m*
*lein repl Warning: problem requiring leiningen.cljsbuild hook: Could not
locate
You have to be careful when using Clojure or Java operations in core.logic
programs. I would recommend avoiding it until you're comfortable with
writing pure core.logic programs.
On Monday, August 6, 2012, Jim - FooBar(); wrote:
caution! logic noob question following...why does the following
I just launched https://www.schoolseatingcharts.com , which might be of
interest to this mailing list because it's constructed out of 100% Clojure
and ClojureScript. The codebase is about 60% Clojure (all running on the
server) and 40% ClojureScript (all running on the client). Altogether, it
On Mon, Aug 6, 2012 at 8:52 PM, Mikera mike.r.anderson...@gmail.com wrote:
Great stuff!
I'm trying to use this functionality to deploy a library using Maven/Eclipse
Juno on Windows and keep getting a timeout (but interestingly the jar and
pom do make it up there) - see this SO question :
On Tue, Aug 7, 2012 at 6:21 AM, cej38 junkerme...@gmail.com wrote:
By the way, if I grow my hair out will I become as technically awesome as
David and Rich?
YMMV :)
Regards,
BG
--
Baishampayan Ghose
b.ghose at gmail.com
--
You received this message because you are subscribed to the Google
42 matches
Mail list logo