#(when-not (nil? %) %) data) it should work like a charm!
Unfortunately i don't have a CA!
Jim
On 18/06/12 22:58, Jim - FooBar(); wrote:
First of all thanks both of you...As far as the tests go It is
ridiculously easy to reproduce the 'bad behaviour' simply by passing a
ed as well?
Jim
--
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 unsubscribe from t
This is really impressive!!! From 61ms it went down to 0.8ms !!! doing
this is way faster than records I think...and since the fn I memoized
takes no args it can't be cached more than once yes?
Jim
ps: my second question can be considered reduntant...I meant to say that
some of the ke
Is there a catch to this that I'm not seeing? It seems to work just
fine...after all the fn always returns the same thing (which always has
the same values in)...
Jim
On 19/06/12 12:57, Jim - FooBar(); wrote:
This is really impressive!!! From 61ms it went down to 0.8ms !!! doing
this i
:record-name "Clondie24.checkers.CheckersPiece"
:mappings board-mappings-checkers
:north-player-start (starting-checkers true)
:south-player-start (starting-checkers false)}
Jim
--
You received this message because you ar
particular slot returns a var that holds an atom...do you
mean that the same atom value will be returned forever even though the
actual atom will have been swapped! or resetted! ?
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post
On 19/06/12 13:27, Jim - FooBar(); wrote:
On 19/06/12 13:06, Tassilo Horn wrote:
But I don't think the above applies to your usecase. Can it be that the
function constructs the returned map by inspecting the value of some
ref/atom or the current-phase-of-moon or so? In that case, you
On the other hand I am not dereferencing the atom inside the map so i'm
not 'inspecting it' as you said before...just returning the
var...dereferencing happens elsewhere (when moving for example)...
Jim
On 19/06/12 13:31, Jim - FooBar(); wrote:
On 19/06/12 13:27, Jim - FooBa
For my use-case both memoize and constantly have the same effect with
memoize being slightly faster [1]...since the atom is not being
dereferenced in the map all is good! new states are being updated and
logged just fine...
Jim
[1] --> without anything a move takes roughly 50-70
I have to deref some it seems as if there is more going on than what it
actually is...constantly or memoize work great in my case because the
map holds essentially constants...ok the atom is not a constant but it
works just fine (provided that it will be deref-ed outside the map)...
Jim
ps:th
e
constants, I certainly don't want to construct it from scratch every time...
Jim
--
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
(If i
defn/declare)...the only way is to have defn in both places...
Jim
On 19/06/12 13:30, Ambrose Bonnaire-Sergeant wrote:
On Tue, Jun 19, 2012 at 8:20 PM, Jim - FooBar(); <mailto:jimpil1...@gmail.com>> wrote:
On 19/06/12 13:06, Tassilo Horn wrote:
Well, if you memoize
what if you need the '$' for interop?
Jim
On 19/06/12 19:25, JvJ wrote:
This is not really a big deal, but I was wondering if there was a
shorter alias for partial in the standard library. It seems like one
of those things that should require a single-character operator.
I
what? is it not a reserved character to denote args in function
literals? I'm confused =-O !
Jim
On 19/06/12 19:29, Jay Fields wrote:
I use %, (def % partial)
On Tue, Jun 19, 2012 at 2:28 PM, Jim - FooBar(); wrote:
what if you need the '$' for interop?
Jim
On 19/06/12 1
On 19/06/12 19:32, Timothy Baldridge wrote:
That works until you try to use the shorthand for anonymous functions:
(map #(inc %) [1 2 3]) ; what's this going to do?
Timothy
Thank you! :-)
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure&
On 19/06/12 19:06, Jim - FooBar(); wrote:
No no I tried that...the map has to be one of the first things in the
namespace. 2 of its keys call a specific fn that itself expects the
map as argument. everything I tried will either return 'stack
overflow' (if I try to def/declare) or a &
as I phrased it originally did
not make complete sense...
Jim
--
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 pa
until
light-table comes out!
Jim
--
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 unsubs
ith x and y
This is just plain confusing for a a java person isn't it?
Jim
On 21/06/12 18:44, Phil Hagelberg wrote:
"jim.foobar" writes:
If we aot compile a namespace in clojure will it be harder to
decompile than the Java equivalent? Recently, the concept of securing
code
position 0 0 0}}]
(let [sphere (mesh.sphere.)]
(doto sphere
(.SetColor color)
(.SetPosition position)
(...)
(...)
(...)
)))
Jim
ps: 'doto' will give you back the object and will not ask you to repeat
the name in every expression following (as opposed
ual Exception object (e) but on
second thought I don't see any advantages...
Any ideas?
Jim
--
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
On 25/06/12 12:31, Tassilo Horn wrote:
"Jim - FooBar();" writes:
Hi Jim,
the only thing I can think of in order to test whether a fn does
indeed throw an exception when certain circumstances are met is
something like this:
(fact (try (fn-that-throws-exc bad-arg)
(catch E
On 25/06/12 13:03, Tassilo Horn wrote:
"Jim - FooBar();" writes:
Hi Jim,
I'm using midje...
Ah, ok. Midje seems to support that, too. See
https://github.com/marick/Midje/wiki/Prerequisites-that-throw-exceptions
Bye,
Tassilo
excellent! Thanks Tassilo :-)
Jim
ps:I
Well, it took a little longer than I thought it would, but we announced
support for XA on Immutant today:
http://immutant.org/news/2012/06/26/transactions/
Enjoy!
Jim
On Saturday, December 31, 2011 7:59:27 PM UTC-5, Jim Crossley wrote:
>
>
>
> On Dec 31, 7:33 pm, Stuart Hal
- Deploys your Leiningen projects from disk, no war file necessary
- Multiple apps can be deployed to a single Immutant, each with its own
isolated runtime
- Embedded Swank/nREPL servers let you build your app while it's running
in the container
Give it a gander!
Thanks,
Jim
--
forming a single app that depends on those libraries.
Jim
Toby Crawley writes:
> 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 appli
nothing to base this on...
Jim
On 03/08/12 08:49, Daniel Silén wrote:
Hi!
I am new to the language, and at the moment playing around with
concurrent-constructs as presented in a series on Clojure concurrency
at pluralsight.com (by Chraig Andera).
When playing with thread-local redefinitions
the idea was to make the behavior of dynamic vars in these
contexts less surprising / more useful, but YMMV.
-Marshall
aaa ok thanks a lot...I do think this needs to be documented...I can
add an example on clojureDocs but the actual documentation needs
updating as well...
Jim
--
You received
least that is
the way I see it...I originally thought you were asking about how to
create a record at runtime via a macro or a function, which is actually
quite tricky (and I can certainly help), but what you're asking sort of
exists doesn't it?
Jim
On 04/08/12 17:44, Warren Lynn
p this is very strange...i'll update clojars within the next
hour...sorry about this!
Jim
On 04/08/12 18:52, Timothy Washington wrote:
Hey Jim,
So I started playing around with clojure-encog
<https://github.com/jimpil/clojure-encog>, and I'm pretty excited
about it so
those arguments is: how
about assembly language? It definitely works, definitely powerful, and
put no restrictions on the user. I know nobody who is a fan of such
language.
Deep inside, we are all fans of assembly or at least we should be... :)
Jim
--
You received this message because you ar
nspots example...
Hope that helps... :)
Jim
ps: empirically, tanh and sigmoid work almost always best...I can say
the same for the nuygen-widrow randomiser...Also, just so you know I'll
be renaming clojure-encog to "enclog" for the 0.5 release...
On 04/08/12 19:18, Jim -
I will address your second issue shortly...You say you have a lazy-seq
of arrays that have 5 strings? why strings?
Jim
On 04/08/12 20:02, Jim - FooBar(); wrote:
Clojars has been updated with a clojure-encog jar containing all the
namespaces...I'm really sorry I can't believe I hadn
omise you it will be the first thing I look at as soon as I
find some time...
hope that helps...
Jim
On 04/08/12 20:08, Jim - FooBar(); wrote:
I will address your second issue shortly...You say you have a lazy-seq
of arrays that have 5 strings? why strings?
Jim
On 04/08/12 20:02, Jim - F
r me to convert those
strings to doubles, datetimes, etc.
cool! i think read-string should do it anyway (at least for numbers)
This helps a great deal
that is good to know... cheers!
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure"
ability to
optionally attach validator functions to some record fields. I have to
admit that sounds nice...we can already do that with atoms why can't we
do that with regular vars?
Jim
On 04/08/12 22:06, Warren Lynn wrote:
I am not sure I follow...If you're just creating a new record
as confirmed in this post:
http://www.heatonresearch.com/node/2124
Jim
--
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 - ple
lling-salesman-problem example. that should sort any compilation
issues...
Jim
On 04/08/12 23:35, Timothy Washington wrote:
Ok, this makes sense.
Thanks very much for your insights.
Tim Washington
Interruptsoftware.ca <http://Interruptsoftware.ca>
416.843.9060
On Sat, Aug 4, 2012
(.getConstructors recordclass)))
args (map #(symbol (str "x" %)) (range max-arg-count))]
(eval `(fn [~@args] (new ~(symbol recordname) ~@args)
One can do whatever he wants with 'args' before passing them in...This
has solved a lot of my problems!
emagh to respond within the week. I do remember some other guy
very much interested in financial predictions but he was doing
everything in C#...
Hope that helps,
Jim
On 05/08/12 19:27, Timothy Washington wrote:
Hey all,
This post is a fork of a thread in the post "community int
because i don't recall getting any weird behaviour and so I
assumed this worked with sets as well...
Jim
On 05/08/12 22:18, Phil Hagelberg wrote:
On Sat, Aug 4, 2012 at 11:45 PM, Mark Engelberg
wrote:
My jaw is dropping here. I can't believe anyone would seriously propose
that the
e to see the solution unfold! In fact if you get it
going I'd love to add it in the clojure-encog examples...
Jim
On 05/08/12 20:40, Timothy Washington wrote:
Hey Jim,
Yes, it absolutely crossed my mind to post this on the encog-java
forum. So I did just that (see here
<http://www.heat
(Math/abs (- y b)))
(== q [a b])
thanks in advance,
Jim
--
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
I do
instead for the difference and how would I get the absolute value of the
difference? any pointers?
Jim
--
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
thmetic...could this be exactly what I need (for subtraction at
least)? as far as the 'Math/abs' bit is concerned I really don't know
what to do!
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, sen
lt; a xmax)
(< b ymax)
(= (- x a)
(- y b))
(== q [a b])
They are very similar aren't they? same operators, same functions etc etc...
any help/clarification?
Jim
On 07/08/12 11:34, Jim - FooBar(); wrote:
On 07/08/12 11:26, Moritz Ulrich wrote:
You can. Usin
ro b board) (!= b y) (== a x)])
(== q [a b])
Thanks again!
Jim
--
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 pati
as well and you
can do whatever you want with it (it's only 55 lines or so)...
cheers
Jim
On 07/08/12 13:40, Jim - FooBar(); wrote:
On 07/08/12 13:19, David Nolen wrote:
(= (- x a) (- y b))
Is not going to work. You probably want.
(project [x y a b]
(== (- x a) (- y b)))
Though o
y [pt]
(pt (fn [x y] y)))
(def pt (make-point 1 2))
(println [(point-x pt)
(point-y pt)])
--
-- Jim Weirich
-- jim.weir...@gmail.com
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@go
loop(s)
and a couple of flags but I'm really struggling to tweak the 'draw-grid'
accordingly to paint the colours as well...
Any seesaw gurus? -> please help...
cheers,
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" g
e
back...they are not alternating! Have I misunderstood? thanks for
bothering btw... :-)
Jim (Dimitris)
--
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
On 09/08/12 11:17, Jim - FooBar(); wrote:
On 09/08/12 10:08, Stathis Sideris wrote:
How about drawing all the rectangles with .fillRect()
<http://docs.oracle.com/javase/7/docs/api/java/awt/Graphics.html#fillRect%28int,%20int,%20int,%20int%29>
and before each call alternate between bla
On 09/08/12 11:23, Jim - FooBar(); wrote:
aaa ok sorry...you mean having it as doseq binding...that makes sense!
I apologise for rushing...
Jim
No I can't put 'cycle' inside a doseq cos its trying to consume it!
Jim
--
You received this message because you are subscribe
)
(.fillRect g x y 50 50)) ))
Thanks a lot! It looked impossible to achieve without mutation, indices
and counting pixels!!!
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroup
500) directly...I am
suspecting there must be some easy way to get around that yes?
Just so we're clear, question #1 is the important one...
Thanks in advance,
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
o open
up a new one! this is weird yes?
Jim
--
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.
On 09/08/12 16:21, Nikita Beloglazov wrote:
I'm going to organize little clojure course at my university this year.
this is amazing! seriously, bravo! what university is this?
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
assumes that the initial ordering of moves ('successors') has been
preserved throughout the recursion and so I can use .indexOf to go from
the score back to the move that started it all! Is this the case? I am
suspecting not! any suggestions?
Thanks in advance,
Jim
--
You receive
Hi everyone,
I was thinking about how to invert the 'nilo' relation found in core.logic:
(defn nilo
"A relation where a is nil"
[a]
(== nil a))
there is a != operator but it is in the arithmetic namespace so i don't
expect it to work...
any pointers?
J
hmmm...good question!!! It can be anything can't it?
basically I'm trying to assert whether a specific index in a vector is
nil or not but i am inside a conde statement...Can I still use boolean
functions like 'nil?' ?
Jim
On 15/08/12 14:07, Ambrose Bonnaire-Sergean
to
check each move generated against the current-board. essentially
filtering out the moves that are blocked by other pieces...do you think
this can be done non-relationally by a novice or am I better off using a
regular fn?
any clues are greatly appreciated...
Jim
On 15/08/12 14:32, David N
On 15/08/12 15:09, David Nolen wrote:
On Wed, Aug 15, 2012 at 9:53 AM, Jim - FooBar(); wrote:
OK thanks a lot both of youit turns out the != works just fine!
at the moment I've almost completed the entire moving rules for chess and
checkers (including kills) but only on an empty
is possible
but timing it for a couple of hundred times shows no difference
whatsoever (it settles at 1.81 ms roughly)...this is really good
stuff!!! Chess is almost complete now!I can start showing things up on
screen :-)
In case someone is confused about ho
examples using (fn [e] (... ...)) but I'm
sure I've seen snippets that use #(... ...). What is going on?
Jim
--
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 fro
aaa ok thanks a lot! I was under the impression that #() created a (fn
[& args] ...) !
Jim
On 17/08/12 11:46, Bronsa wrote:
this is because the #() checks for arguments used inside its body to
infer its arity. in #(alert "..") you don't use any arg so it creates
if someone has done
anything similar...I honestly wish i had started coding checkers first
so I could compare with the Java one! at least i would knew whether to
pursuit it further or not...
thanks a lot for your patience and looking forward to comments :-)
Jim
--
You received this message b
s +
2x2 knights). There is a lot of work to be done in each branch so
assigning a future to each, sounds reasonable. However if that was
actually happening I should be seeing all 4 cores working non-stop!
I just wish pmap worked!
Jim
--
You received this message because you are subscribed
vels i get almost 100% utilisation of
cpu but nothing useful happens!!! anyway, I'll have a look at reducers!
thanks for the snippet anyway!
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju
s
my algorithm completely wrong? this is scary stuff...
the bad news is that i always get the same answer regardless of the
depth...also something suspicious is the fact the no matter the depth
the r/map returns in constant time! something smells here!
Jim
On 18/08/12 19:24, Jim - F
hts are very much welcome...I am just starting playing around
with reducers but it seems like the situation I'm in is the perfect
candidate for this sort of thing and I want to know more! Also without
this, my chess minimax searching is hopeless!
Jim
--
You received this message because
goes
out the window with agents doesn't it?
Again thanks a lot for your time and thoughts!
Jim
--
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 fro
itely play around with your code
tomorrow morning...if you say you can go up to level 5 in 11 sec this is
really good performance -I can't wait to explore the code...I'll let you
know of any comments of mine soon!
Jim
--
You received this message because you are subscribed to th
extra parameter (direction) ,which
I'm negating after each level, so I know who I'm scoring at the bottom!
Did you have any of this when you run yours?
Jim
On 19/08/12 21:32, nicolas.o...@gmail.com wrote:
A correction for the wrong part:
(defn my-max ([x y] (if (nil? x) y
nil? x) y
(if (nil? y) x
(min x y
([] nil))
'max-key' does look like the perfect candidate for this job but
unfortunately I can't get it to cooperate with reducers! Problem...
Jim
--
You received this message because you are subscribed to the Google
Gro
On 20/08/12 12:34, Jim - FooBar(); wrote:
On 20/08/12 10:12, nicolas.o...@gmail.com wrote:
(defn generate [board next-boards]
;; next-boards return a seq of MoveAndBoard
(BoardAndChildren. board
(r/map (fn [m]
(MoveAndTree
)) (:children tree))...
I'd love to see some proper usage of reducers so I can understand what
is going on...From all the videos I've watched, I 've understood that
the algorithm I'm implementing (minimax) is an ideal candidate for
reducers - however I've still not
://groups.google.com/forum/?fromgroups=#!topic/clojure/wjO5imtEoRs
<https://groups.google.com/forum/?fromgroups=#%21topic/clojure/wjO5imtEoRs>
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@
e))' approach with the 'r/fold' equivalent.
btw (:children tree) is foldable cos it is the result of calling r/map.
Jim
On 21/08/12 17:17, Dennis Haupt wrote:
i assume you are coming from a java background?
if so, every time you wrote this:
Result result = null;
for (Stuff
ince each branch from
the root can essentially be generated/traversed independently...pmap-ing
at the top did very little, using a fixed thread pool did nothing, my
only hope is now r/fold...
Jim
On 21/08/12 16:29, Michał Marczyk wrote:
Actually no, reducers are applicable to all sorts of coll
e.core.reducers/fold (reducers.clj:98)
I thought I did not need the jsr166y.jar under java 7...what is happening?
Jim
--
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 th
Has clojure 1.5 apha3 been aot-compiled against java 6?
Jim
On 21/08/12 19:40, Jim - FooBar(); wrote:
Hi everyone,
I get this very strange error even though I'm using clojure 1.5 alpha3
and java version "1.7.0_02" on Java HotSpot(TM) 64-Bit Server VM !
ClassNo
I built clojure 1.5 snapshot from source and installed it in
~/.m2/repositories/org/clojure/ via 'mvn install' but now lein2 reverts
to 1.3 after amending my project.clj!!! How can I make leiningen aware
of the newly installed snaphot version?
Jim
On 21/08/12 19:49, Jim - FooBa
tions {:classpath "target/dependency/encog-core-3.1.0.jar"
:destdir "target/classes"}
;:java-source-path "src/java"
;:main Clondie24.games.chess
)
Jim
On 21/08/12 20:28, Nelson Morris wrote:
Whats the project.clj look like?
On Tue, Aug 21, 2012 at 2:25 PM,
wow! I would have never found that on my own! my temporary solution was
to cheat (renaming the jar) but your suggestion works as well...Thanks a
lot Nelson... :-)
Jim
On 21/08/12 21:35, Nelson Morris wrote:
This took me a while to debug cause I expected [org.clojure/clojure
"1.5.0-m
hmmm... I see. anyway I sorted my problem my building the latest clojure
snpashot from source on my machine with Java 7 and then installing it
~/.m2/repositories/...
Jim
On 21/08/12 21:41, Sung Pae wrote:
"Jim - FooBar();" writes:
I thought I did not need the jsr166y.jar un
completely...I should be seeing massive performance benefits! Havinf
done somehtign similar yourself if you can provide any insight that
would be fantastic!
Jim
On 22/08/12 00:12, Joshua Ballanco wrote:
Not sure if you'd consider this "real code", but I recently wrote a
scrabbl
and 2 for each knight) but quickly goes up to 30, 40, 50 etc. I will try
your suggestion...
3)I'm not sure I understand what you mean...You're returning nil - I'm
returning a very small number, they can both be read by the next branch
don't they?
Jim
On 22/08/12 10:04
sequential equivalent)...
Jim
On 22/08/12 13:33, Jim - FooBar(); wrote:
Hi again Nicolas,
1) My moves at the top are a result of r/map...I did try to pou it all
in a vector with 'nto []'
but nothing changes.
2)well, no there is no way to have 512 moves at any point in in the
game!!
lue
keys) where the :value key could be Integer/MIN_VALUE - I'm not doing
(:value Integer/MIN_VALUE) anywhere...
Jim
--
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
N
t is just heating up (my ubuntu
becomes less responsive as well)!
Jim
ps: Could it be that the sequential version really is a lot worse than
what I'm approximating?
On 22/08/12 14:20, Jim - FooBar(); wrote:
On 22/08/12 14:08, nicolas.o...@gmail.com wrote:
You should see a close to *4
.Thread
peak is 12 if I remember correctly (quad-core cpu).
Have I hit the limit? I don't want to think that core.logic is to
blame...after all, I went through rough times in order to encode the
rules in core.logic and I thought i would have performance benefits as
well (apart from cl
he board) x 6 columns (the pieces)...I will try that as well!
thanks Nicolas
Jim
--
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
turns instantly (less than 1ms). But both these fns should only be
called n times (where n is the depth)...this is weird stuff indeed...
Jim
On 23/08/12 12:43, Jim - FooBar(); wrote:
On 23/08/12 09:35, nicolas.o...@gmail.com wrote:
If it is so slow, that's maybe because the branching facto
On 23/08/12 20:23, Jim - FooBar(); wrote:
But both these fns should only be called n times (where n is the depth).
now this is completely wrong!!! next-level should be called on every
single node!!! 8421 times for level 2...
Jim
--
You received this message because you are subscribed to
make sure to bind *read-eval* to false when reading arbitrary code from
files...
(defn read-back
"Read the file f back on memory. Careful not to eval anything dangerous
(#=)."
[f]
(binding [*read-eval* false]
(read-string (slurp f
Jim
On 23/08/12 21:32, larry google groups wr
Hi all,
It seems that trying to instantiate a new record via its own methods
fails!!! example:
(defrecord Foo [a b c]
Bar
(update-position [this np] (Foo. a np c)))
No matching ctor found !
There must be a way to do this without going round and round in functions...
Jim
--
You received
On 24/08/12 11:32, Jim - FooBar(); wrote:
Hi all,
It seems that trying to instantiate a new record via its own methods
fails!!! example:
(defrecord Foo [a b c]
Bar
(update-position [this np] (Foo. a np c)))
No matching ctor found !
There must be a way to do this without going round and
yes sorry, I was missing an argument!!!
Jim
On 24/08/12 11:43, Ambrose Bonnaire-Sergeant wrote:
Hmm I can't see to reproduce.
ambrose@ambrose-VirtualBox:~$ lein repl
nREPL server started on port 33367
REPL-y 0.1.0-beta10
Clojure 1.4.0
user=> (defprotocol Bar (update-position [this n
...
however level 4 is still out of practical reach...I really don't want to
involve Java arrays and stuff like that!
Jim
On 24/08/12 10:26, nicolas.o...@gmail.com wrote:
More optimsation ideas:
(defn next-level [b dir]
(r/map #(Move->Board. % (core/try-move %))
(core/te
problem especially
after dropping the alive objects to 6,000 from 29,000...first pane you
mean the first tab yes - where it shows the graphs (bottom left graph)?
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, sen
801 - 900 of 1184 matches
Mail list logo