y I'am tThe main point for me of this whole discussion is that someone
should use clojurescript if he want to use clojure instead of javascript on
the browser.
Like GWT, JWT, ZK or other, you do not longer develop in the client
language. You develop in a different language and compile/generate
On 3 août, 03:00, Mark wrote:
> The compiler might not be able to do better but the runtime system certainly
> could. In this case, both filtered and more information is what's needed.
> Why couldn't the runtime generate a message like:
> Symbol "fac" of type clojure.lang.IFn is used where type
The talk was really enligthing... but I would say it is still
research.
While I can trust you can make, say an intuitive and reactive UI for
flash like animations, I think there are still problems to take care
of for the program example.
Here this is just a simple algorithm without long calls ins
ike you want to. That would be interesting to
see and experiment on.
Have a nice day, all!
Nicolas.
On 8 mar, 08:37, Sean Corfield wrote:
> On Wed, Mar 7, 2012 at 5:10 PM, Mark Engelberg
> wrote:
> > * introducing variables creates new indenting level, making code "creep to
>
Well maybe the problem of the let? macro is that it is not standard.
If you use standard constructs and I'am proeficient with clojure I'll
understand your code fast. I'll concentrate on understanding your code
relevant for your application and domain. But just adding a few new
constructs specific t
(Sorry for split post).
So I'am not against let? macro of whatever you might need. That why we
have a lisp here. But be sure you really need it/use it. And it is
designed to be intuitive as possible.
On 9 mar, 23:05, Nicolas wrote:
> Well maybe the problem of the let? macro is that i
27;t share your views.
Regards,
Nicolas Bousquet.
On 29 juin, 01:32, Warren Lynn wrote:
> This is an off-shoot subject from my last post "General subsequence
> function".
>
> I found people had similar questions before (one year
> ago):http://groups.google.com/grou
I would rather say difficult than impossible... and maybe not that
important.
After all JVM is turring complete. If scheme can do it compiling down
to machine code, clojure could do it compiling down to JVM bytecode.
On Sep 7, 1:54 am, Brian Goslinga wrote:
> On Sep 6, 11:20 am, Michael Jaaka
>
On Sep 28, 1:30 pm, Gary Poster wrote:
> On Sep 28, 2011, at 1:26 AM, Sean Corfield wrote:
>
> Perhaps Java has been different, but the languages I use and follow have not,
> with the exception of JavaScript. I perceive it to be a mildly unfortunate
> fact of life at this point.
>
> Gary
Java
Clojure has native interoperability with JVM & CLR. This mean that you
can have part of your code written in Clojure, part in Java/Jython/
JRuby if your target the JVM or C# if you target CLR. Of course you'll
not be able to mess everything like first half of a method in Clojure,
second half in jav
Best would be to act as professionnal:
- try to convince your new boss of the benefits of using clojure from
a business point of view.
- if this fail, either go back to writing java or quit.
But do not try to abuse your boss and company by developping in
clojure behind the scene and deliver some c
I think that backward compatibilities problem do hurt. Some people
will not invest in an "unstable" language by default and some will be
tempted to give up after experimenting too many problem with it.
We don't choose a language,we choose a full echosystem that include
libraries, IDE tooling, docu
After all an human can do it manually.
But I see it as more a research topic than engineering topic. With low
probability of sucess. It is a good thing to work on it then when
many things aren't here yet for clojure?
Best Regards,
Nicolas.
On Sep 30, 5:48 am, Hank wrote:
> > I thin
A good book to learn lisp macros, is On Lisp from Paul Graham. This
book really cover advanced topics and concepts, and has many chapters
related to macros.
The book is freely available in online format from Paul Graham
Website: http://www.paulgraham.com/onlisp.html
On Oct 6, 1:02 pm, Michael Jaa
For me the real meaning of this is that support for new features in
closure library will stop in its actual form in the years to come.
Only bugs will be corrected, no more. This is already the case in a
sence I think, because before Dart, GWT was viewed as the new official
way to make new web appli
Yes you need to provide an implementation of the protocol for the type
directly or a parent interface.
What the initial author says is that you can do that on any type, even
on an outside library, without changing the initial Type source code
or recompile it. You can do that at runtime and because
Hi!
Well [1 2 3] is just a syntaxic sugar for (vector 1 2 3):
=>(vector 1 2 3)
[1 2 3]
When you enter a vector in the repl, it is evaluted to itself. Here an
example that show it:
=>[1 2 (+ 1 2)]
[1 2 3]
And you can use the vector function for the same result:
=>(vector 1 2 (+ 1 2))
[1 2 3]
The
In your example, extending cascade.Asset work because it is considered
as a java interface, and is supported for interoperability. But this
is likely not what you really want to do as Asset is still not a
clojure type.
Hope this help,
Nicolas
On 28 oct, 19:46, Howard Lewis Ship wrote:
> I&
subpart of the file for example,
another function another part and call them sequentially. But as shown
in the simple previous example it simply doesn't work.
My understanding is that some immutable thing is in the middle and it
act like the data reference isn't changed between calls.
#x27;t seems clojurish while I'am not sure on the memory
usage implications on the first for the lazy sequence.
Any insights?
Best Regards,
Nicolas
On 1 nov, 01:09, nchurch wrote:
> The problem you're having doesn't have anything to do with file
> reads. Every time you c
Hi,
I'am not really sure on your explanation here.
For me if the processor, JVM or clojure compiler cannot prove it
doesn't change the semantics, the optimization will not be applyed.
readLine behing a java method call, it can perform any operations and
thus clojure compiler will not change the e
performance. And if you need this boost.
I think then that's the library author responsability and own right to
figure by himself where ultimate performance is needed or instead
where greater flexibility is to be prefered.
Bye,
Nicolas.
On Nov 21, 5:12 pm, Tassilo Horn wrote:
>
Hi, I was wondering if there's a drop function somewhere in contrib
that work for strings. I didn't found any so I wrote my own:
(defn drop-str
([s] (drop-str 1 s))
([n s] (apply str (drop n (seq s)
This is not really fast, a better version would be something like
that:
(defn drop-str [
> You can use (.substring s n), if n is larger than string length it
> will return a empty string.
Hum... that's not my experience, I'm at my job right now so I can't
double check this. Looking at the javadoc, it appears that if n is
larger than the string length it will throw an
IndexOutOfBounds
Wow, I really didn't expected this one! I also came to realize that
I've been using Clojure for a year now, the longest period of time
I've devoted to a single non-mainstream language. A million thanks!
Congratulations to Rich and all contributors.
On May 4, 8:58 am, Rich Hickey wrote:
> After
Hi, I'm wondering how Clojure API reference page is generated? I'd
like to adapt it for the future Compojure website if possible. On
another note, how is Clojure website built and what language/framework
does it use?
Thanks
- budu
--~--~-~--~~~---~--~~
You receive
Hi, I've been playing with nio lately and it's been quite fun to delve
in lower level stuff again, didn't do that in a long time. I've
translated a small example, just to read a file, and the result is
performing really well. Here's the code:
(defn read-file [#^String f #^String cs #^Integer buff
I've got an even faster version using memory-mapped file I/O. It also
simplify the code a little bit.
(defn fast-read-file [#^String filename #^String charset]
(with-open [cin (. (new FileInputStream filename) getChannel)]
(let [size (. (new File filename) length)
char-buffer (. B
Great, exactly what we needed!
On Jun 11, 7:51 pm, Tom Faulhaber wrote:
> Rich posted the code he uses here:http://paste.lisp.org/display/77339
>
> But note that he's building it in wiki markup and not html.
>
> HTH,
>
> Tom
>
> On Jun 9, 4:13 pm, Nicolas Buduroi
to pull this magic out in a reusable way?
Can I try to do it or it is really difficult/impossible?
I think, it would quite Lispy for Clojure to have very few differences
between REPL and compiled runtime.
Thanks a lot for your help,
Best regards,
Nicolas.
--~--~-~--~~---
critical. Is there a way to trick an eval into believing, it is a
compiler? (I know the trick must involve *compile-files* and
*compile-path* in some way, but I can't manage to make this work.)
Are there other people on the mailing list compiling (calling eva
the API?
Best regards,
Nicolas.
On Tue, 2009-06-23 at 15:09 -0700, samppi wrote:
> The idiom (into {} coll-of-entries) is often used to create a map from
> a collection of entries or two-sized vectors. But what if I want to do
> something like this:
>
> (mystery-fn [[:a 1] [:b 3]
ivalent to creating an
empty map.
Currently, it results in some special case in macros or adding a :dummy
field to any generated struct.
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "
in code duplication: less readable, harder to modify, error
prone.
)
However, (create_struct) seems like a natural generalisation of
(create_struct & keys).
Best,
Nicolas.
On Wed, 2009-06-24 at 10:27 -0500, Mark Volkmann wrote:
> On Wed, Jun 24, 2009 at 10:07 AM, Nicolas Oury
&
t a_struct &keys = (apply struct a_struct keys)
But it looks a bit strange and complicated.
On the other hand, most languages allow empty records.
Best,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
(either modifying the constructor or
first and next).
Alternatively, a null keys can be replaced by an empty list in the
createsSlotMap.
Best,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure&qu
> I'm not running off any server. All the pages are static html, which
> are generated by a Clojure script.
No kidding! I've done the exact same thing for my first website. It
was using Scheme though and leveraged Oleg's SXML library, it bring me
back fond memories. I'm looking at that old code r
er is the reason I plan to use soft references and not weak
references)
I am not a clojure expert and I am not a java coder at all, so don't
hesitate to tell me if my plans are somehow wrong.
Bets regards,
Nicolas.
--~--~-~--~~~---~--~~
You received this message
1) too.
Of course, incremental hash consing of sets/map/vectors could give us
adding/removing a children in a better time than O(num of children) but
I don't have much clue on how to do that. Any ideas?
Best,
Nicolas.
--~--~-~--~~~---~--~~
You received
L to set! *war-on-reflection* and some
other similar vars. (*ns*, *compile-files*, *compile-path*, etc...)
I suppose the compiler does a similar thing, but I have never looked.
Best,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscri
t you should be able to
store size/depth in the vector too.
Best,
Nicolas.
On Tue, 2009-06-30 at 02:28 -0600, Daniel Lyons wrote:
>
> On Jun 30, 2009, at 1:05 AM, Emeka wrote:
>
> > Hello All,
> >
> > I have a BinaryTree Nodes that I want to resolve it'
ne could also think of validators, etc...
It seems a very nice idea. I would suggest the use of agents, for the
states, rather than atom. Especially, the possibility to
have watchers seems good.
But I am a newbie so I can be wrong.
Best,
Nicolas.
--~--~-~--~~~---~--~---
t;
Then it could be great to cache the modifications in vars and commit
them atomically to Refs when you close the dialog.
> Watche(r)s work on all IRef types.
>
Thank you very much for the information. I didn't know that.
Clojure is even better th
executing.
Can a clojure expert confirms wether it would work or not?
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@google
level? Is that a loop where you run
multiple times the same program?
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@google
I suspect you are not using double arrays with direct array manipulation in
CLojure.
I wonder whether it is linked to the fact your arrays are not in local (let)
variables.
I will try to randomly change a few things in your implementation tomorrow.
Best,
Nicolas.
On Fri, Jul 3, 2009 at 9:56
function that call a method, that
does that. As setting an array is very quick, even the slight overhead of
calling a method makes the program far slower, in a tight loop.
I will start another thread to ask whether this is really the problem and if
it can be solved.
Best,
Nicolas
having array access to primitive types as fast as in java would be a good
start to authorize cpu intensive programs to be written in clojure.
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
Thanks for the reply. It seems to speed up quite a bit the array of double.
I cannot manage to make it work for the array of booleans. Is there someting
different?
If aset and aget are faster, what is the goal of the aset-xxx?
Best,
Nicolas
form it, because you can write easily a better implementation.
(The code I wrote is really ugly, because it was made as multiple hacks,
but I think with more experience than me and more cleverness in the design,
you can keep the code really expressive and clear, while achieving the same
level of
where either in my program or my computation of the speed.
Let's wait for igorrumiha to check and to test this implementation.
Best regards,
Nicolas.
On Sun, Jul 5, 2009 at 12:18 PM, fft1976 wrote:
>
> On Jul 5, 2:31 am, Nicolas Oury wrote:
>
> > After, when I run the
ns to find the
fastest on my computer. That is quite strange the fact that the size xhange
so much the result.
Really a fun exercize in writing benchmarking clojure, though.
Best,
Nicolas.
On Jul 5, 2009 6:53 PM, "igorrumiha" wrote:
On Jul 5, 3:05 pm, Nicolas Oury wrote: > Actually
Hi, I needed to call a static method on a class stored in a var
yesterday and found that it was a little bit trickier than I initially
thought. There's three way of doing it, the two first are quite
straightforward and working ;-) e.g.:
(import '(java.nio ByteBuffer FloatBuffer))
(def foo ByteBu
I've just figured out that the macro version in the allocate example
can't be used with local variables.
(let [foo ByteBuffer]
(allocate1 foo 1024))
throws java.lang.UnsupportedOperationException: Can't eval locals
(NO_SOURCE_FILE:94)
On Jul 6, 6:59 pm, Nicolas Buduroi
> If you know the method you wish to call, do you not know the class and can
> thus call the static method directly?
Well that was the point of the question, that is if I have to call a
static method on a class we don't know in advance. I understand this
capability isn't that useful and is quite
> Lets say you want to call static method "foo" of a class,
> but you don't know which class -- you want this to be
> specified at runtime in a parameter. Something like this:
>
> (defn map-foo [cls coll]
> (map cls/foo coll)) ; doesn't work
>
> As mentioned by others, one approach is to u
Hello,
Can this construct handle higher-order functions?
(I mean a function with named arguments as an argument to another
function).
It seems quite difficult to do a function dependent transformation on
the call site when the function is unknown.
Best regards,
Nicolas.
On Thu, 2009-07-16 at
, the code can get much longer
(exponentialy sometimes).
How do you plan to handle these situations?
Best regards,
Nicolas.
On Mon, Jul 20, 2009 at 3:01 PM, Meikel Brandmeyer wrote:
>
> Hi,
>
> On Jul 20, 3:48 pm, Mark Volkmann wrote:
>
> > I'm trying to understan
Hello,
I am not sure to agree.
If I get it right, definline is used to replace defn for function that
we want to be inlined.
So replacing defn by definline should have no impact on the semantic of
the program.
Best regards,
Nicolas.
On Thu, 2009-07-30 at 05:34 -0700, Rich Hickey wrote
I have no clue whether it is the case).
- replace ints with longs (corresponding assumption).
- I read somewhere about an option of the JVM for better cache-aware
allocation. But I don't remember what it was
ans whether it was in 6 or will be in 7.
Cheers,
Nicolas.
On Thu, Aug 6, 2009
Hello again,
Another interesting test: replace the double operation by something longer,
that won't allocate anything.
(a long chain of math functions with primitive types...), and see if the
parallelism is better.
Best,
Nicolas.
On Thu, Aug 6, 2009 at 2:32 PM, Nicolas Oury wrote:
&g
le.)
I am interested in this global cache for valueOf thing and haven't find
any good explanations on that phenomena. Does someone have a link to
some ressources?
Thank you very much,
Nicolas.
On Sat, 2009-08-08 at 09:49 -0700, Bradbev wrote:
> > I'm not sure how to determi
t, that there is a lock
contention for the common heap.
I don't know how to separate one from the another...
Best,
Nicolas.
> By the way GC is running periodically, but while profiling it does not
> report more than 1 sec of total runtime.
--~--~-~--~~~-
performed by the compiler
will improve performance and by how much.
What is sure is that there is no reason why clojure should be slow, when
some functional languages (including dynamically typed ones) are fast.
So, one day, it will be fast.
Best,
Nicolas.
On Tue, 2009-08-11 at 21:20 -0700
o put everything in one big array, and replace
bodies by their index. I wonder whether there would be a speed-up or not
from removing indirections.
Best,
Nicolas.
On Wed, 2009-08-12 at 00:26 -0400, Aaron Cohen wrote:
> On Tue, Aug 11, 2009 at 8:13 PM, Andy
> Fingerhut wrote:
> >
>
h the java one...
Best,
Nicolas.
On Wed, 2009-08-12 at 17:18 -0400, Aaron Cohen wrote:
> On Wed, Aug 12, 2009 at 4:49 PM, Aaron Cohen wrote:
> > I'm getting a very significant performance improvement by adding a
> > couple of JVM parameters (using jdk 1.6.0_14). They are:
. However, one of the point that makes Clojure
performant enough in a lot of situations anyway is that you don't need
to do that on your whole program. just on the very small part it spends
95% in.
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
You receive
st of its time there:
99.4% 0 + 8804java.lang.reflect.Array.get
Does anyone know how to speed that up?
Is it written somewhere in the java interop documentation?
Best,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscrib
negligible.
I guess that's the price of trying to write solutions to not very
interesting micro-benchmark :).
Best regards,
Nicolas.
On Sat, 2009-08-15 at 12:06 -0400, David Nolen wrote:
> You need to specify the array type. For example the following produces
> a primitive
project using Clojure
to know that once they find a bottleneck in a program they can rewrite
it to go at the same speed as the java program doing the same thing.
That's not a programming style I would advocate for a whole project
though.
Best regards,
Nicolas.
On Wed, 2009-08-12 at
o the kind of programs I am writing, as well as allowing
Clojure to shine in micro-benchmarks.
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
eezy.cs.nott.ac.uk/~npo/PowerPi.pdf
So being a dynamically typed functional language with clean construct
for concurrency makes Clojure an interesting language for certification
I believe.
Apologies for my long mail, never gives the opportunity to someone to
talk about his work...
Best regards,
Nicola
> Much of what you've described is either provided by "newnew", or is
> relatively easy to produce with a couple of macro wrappers involving
> gen-interface and newnew:
That's what I was hoping for. No code generation code to write for it.
--~--~-~--~~~---~--~--
.
Best,
Nicolas.
On Sun, 2009-08-16 at 14:00 -0700, Bradbev wrote:
> >
> > Why can't we write programs in Clojure and
> > drop down to Java if necessary?
>
> That's what I find funny about these threads, Clojure's Java interop
> is good, Java is easy to w
at native speed, at some point in the future though.
And they are the right way to approach this kind of problem, I agree.
Best,
Nicolas.
Mon, Aug 17, 2009 at 3:26 PM, e wrote:
> i don't know much about this (haven't followed closely, lately), but do the
> new Transients c
Seems to mean that I was wrong and that the cost is both in bound check
and unpacking the indices, mostly the second one.
On Mon, 2009-08-17 at 09:25 -0700, Bradbev wrote:
> On Aug 17, 1:32 am, Nicolas Oury wrote:
> > I was referring to the rules of the benchmark game. When you
you want your code to perform well.
Best,
Nicolas.
> (aset-byte dst (inc dst-offset) (byte (bit-shift-right sample
> 8
> (recur (inc src-offset) (unchecked-add 2 dst-offset)
>
>
> Adding type coercions helped a bit but it's still too slow. In
the right place is
clojure/lang/RT.java.
Best regards,
Nicolas.
--~--~-~--~~~---~--~~
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
Ruby-style migrations are great but, as others have said, they lend
themselves better to another layer of abstraction. I was thinking of a
lower-level alternative to migration. We could find a way to construct
an ast from the current database schema and then compare it with the
one generated by the
That's a great idea, hope it gains some traction. I'm recently
unemployed and trying to bootstrap my own startup, so I'll skip this
year. When my financial condition will be more solid though, I'll
certainly donate something. In the meantime, as I intend to build my
projects in Clojure, I'll contri
Hi, on the CommonJS Google Group there was a discussion on semantic
versioning, a formalization of the concept of properly using a common
version number scheme (Major.Minor.Patch) for libraries.
http://semver.org/
I think it would be especially easy to enforce a simple version of
this system in a
s/thinking/think/
On Dec 16, 2:56 pm, Nicolas Buduroi wrote:
> Hi, on the CommonJS Google Group there was a discussion on semantic
> versioning, a formalization of the concept of properly using a common
> version number scheme (Major.Minor.Patch) for libraries.
>
> http://semver.o
On Dec 17, 3:11 am, Laurent PETIT wrote:
> Isn't this the ideal that clojure and libraries are almost more or less
> already following ?
Yes it is, but that's because the maintainers are very disciplined and
professional people. Not everybody follow this scheme properly and
even the best of us ca
On Dec 17, 3:13 am, Roman Roelofsen
wrote:
> Dealing with version numbers at build time is quite easy with tool
> like Maven. The important thing is that everyone agrees on the same
> version semantics (great summary [1]). Putting some more tooling
> around this should be a good idea, yes.
Talki
On Dec 18, 4:16 am, Roman Roelofsen
wrote:
> IMHO, no. This is the whole problem. Library users will mostly care
> about the runtime. It doesn't help at all if your code compiles, maybe
> in isolated pieces, but everything blows up at runtime. For example, I
> never had problems compiling against
Hi everybody, I wrote a help macro to make getting help easier within
the REPL and thought others might also find it useful. It regroups
into one command various helpers found in clojure-contrib:
* classpath: classpath
* ns-utils: docs, dir, vars
* repl-utils: expression-info, show, source
The
Hi, today I needed to use the map function on multiple collections
which didn't had all the same length. In this case, it returns a
sequence of the size of smallest one. But the problem I was facing was
required to map until the end of the longest, padding the smaller ones
with a default value. I c
On Dec 23, 12:30 pm, kyle smith wrote:
> It's a little shorter if you unconditionally concat & repeat.
>
> (defn append-val [val & colls]
> (let [maxlen (apply max (map count colls))]
> (map #(concat % (repeat (- maxlen (count %)) val)) colls)))
>
> user> (apply map + (append-val 0 [1] [2 3]
On Dec 25, 1:52 am, Tom Hicks wrote:
> A slight modification, which I think avoids counting each collection
> twice:
>
> (defn append-val [val & colls]
> (let [lengths (map count colls)
> maxlen (apply max lengths)]
> (map #(concat %1 (repeat (- maxlen %2) val)) colls lengths)
> )
On Dec 25, 9:08 am, "Heinz N. Gies" wrote:
> On Dec 23, 2009, at 6:04 , Nicolas Buduroi wrote:
>
> > Hi, today I needed to use the map function on multiple collections
> > which didn't had all the same length. In this case, it returns a
> > sequence of the
Big thanks to everyone, the suggestions given are all very welcome,
even if I didn't really needed a better version as my use of mappad is
really simple for now. It was just curiosity on my part.
The lazy version by Heinz could be quite useful in other situations,
I've added it to my toolbox. Usin
Hi, just to warn that there's a small problem with sets documentation
in the data structures page of Clojure's website. The hyperlinks to
set operations and pseudo-relational algebra are broken as they
haven't followed the move to the new clojure.set namespace.
- budu
--
You received this messag
Hi, I'm using macros to define special vars (w/ a keyword as type) to
retrieve them later with ns-utils/ns-vars and filter them. I don't
know if this technique is recommended or if there's some better way to
achieve this, but there's something weird happening when we try to
evaluate the var defined
> The macro works fine. The problem is that the REPL tries to print the
> result (which is the var you created) and the print multimethod does
> not know what to do with your custom type, and the default method
> throws an exception.
That was it, thanks a lot.
- budu
--
You received this messag
> So I think the source of the exception is clear, but have you found a
> solution to your original problem? Maybe if you expand on that someone
> can describe a good technique.
I'm using clojure-contrib's ns-utils/ns-vars and find-namespaces/find-
namespaces-on-classpath to discover namespaces a
Hi, I announce my first open source project, it's really small and
doesn't have lots of features yet, but I think it can be already
useful in its current state. I'll always be open to suggestions to
improve it, but as it's only version 0.3, now is the time to get
things straight.
There's two macro
Hi, I'm still not familiar with laziness and I'm trying to make a
function recursively walk arbitrary data structures to perform some
action on all strings. The non-lazy version is quite easy to do:
(use
'clojure.walk
'clojure.contrib.str-utils)
(defn recursive-string-walk [f form]
(walk #(
On Jan 15, 3:25 pm, Sean Devlin wrote:
> Did you try wrapping everything w/ a call to lazy-seq?
Yes, it doesn't seem change anything.
--
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
> Sorry, I forgot to ask: how rapid is "rapidly"?
Oh, I'd say I misused that word, at least it's way more than I need
for what I use this for. I created this post only to see if someone
would have an idea for a fully lazy version out of curiosity. From my
experiments, the non-recursive version blo
On Jan 16, 7:33 pm, Laurent PETIT wrote:
> For the non lazy version , maybe using clojure.zip would help not blow
> up the stack ?
>
> (using clojure.zip/zip + a loop with recur on clojure.zip/next) ?
I've just tried it and it appears to be equivalent to the lazy walk
version, which I think is fu
1 - 100 of 399 matches
Mail list logo