On Mon, Dec 21, 2009 at 6:07 PM, Gabi wrote:
> The problem with is that I need to execute the same function with
> different bindings each time. So caching won't help me
> For example I need to do something like:
>
> (dotimes [_ 1000]
> (intern 'user 'x (rand))
> (eval '(prn (+(* x x) 5
So
HI,
You could look at the Zippers library http://clojure.org/other_libraries
which is useful for editing nested structures in a functional way...
or perhaps you might use one of the Clojure reference types to hold
the notes?
Cheers,
James
On Dec 22, 8:09 am, PM wrote:
> I'm a new Clojure user.
Here's the macro I used when I dabbled in Genetic Programming:
user> (time (dotimes [_ 1000]
(intern 'user 'x (rand))
(eval '(+ (* x x) 5
"Elapsed time: 425.754877 msecs"
user> (defmacro capture-vars [vars expr]
`(fn [...@vars] ~(first (next expr
#'use
The problem with is that I need to execute the same function with
different bindings each time. So caching won't help me
For example I need to do something like:
(dotimes [_ 1000]
(intern 'user 'x (rand))
(eval '(prn (+(* x x) 5
On Dec 21, 11:53 pm, AlexK wrote:
> What eval does, is wra
Hi,
Am 21.12.2009 um 22:53 schrieb AlexK:
> (defn form->fn [list-to-eval]
> (eval (list 'fn [] list-to-eval))) ;this returns a fn
Please, make it a habit of writing even such simple code as `(fn []
list-to-eval) (or `(fn [] ~...@list-to-eval) if list-to-eval is a Var or a
local). If you make
Experimenting with GeneticProgramming with Clojure..
On Dec 21, 11:23 pm, rob wrote:
> Sorry, I somehow accidentally sent it before I was done typing. The
> rest of my sentence was "what are you trying to do thar requires the
> use of evals in that way".
>
> On Dec 21, 4:22 pm, rob wrote:
>
> >
I'm a new Clojure user. I've been working my way through SICP and the
videos that accompany it, and I've also read the Clojure book. I
already do a lot of work with a music notation library (JMSL) in Java,
and I'd like to see if I could do some tasks more simply in Clojure.
One of the issues I r
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
clojure is a lisp, so it has a "real" eval, that works on
datastructures, not strings
eg.
(eval '(+ 1 2)) ; => 3
(eval (list (symbol "+") 1 2)) ; => 3
whenever you write someting like (def x 3), it gets turned into a list
with the symbol 'def, the symbol 'x and the number 3, which then is
passed
> Thanks Newman
> Useful link!
> I'm doing a lot of SIP as well, and I even have a (not so) secret plan
> to extend this to create a simple SIP UA simulation.
You might be interested in
http://github.com/rnewman/clj-sip
--
You received this message because you are subscribed to the Google
Group
Hi All -
I am trying to create a quick and dirty to import all java classes in
a directory tree (i.e. - the classes directory)
I am able to create the import statements and was thinking of using
eval to execute the import. However I cannot get this to work.
key line is:
(eval (str "(imp
Hi All -
I am trying to create a quick and dirty to import all java classes in
a directory tree (i.e. - the classes directory)
I am able to create the import statements and was thinking of using
eval to execute the import. However I cannot get this to work.
key line is:
(eval (str "(imp
I was watching "Pleasantville" again and it reminded me of this whole
argument.
On Mon, Dec 21, 2009 at 6:39 PM, Joost wrote:
> On 21 dec, 15:38, kyle smith wrote:
> > Martin, you're trying to argue that some hypothetical 'unwashed
> > masses' of programmers won't like clojure because of parent
Just posted a short piece on why monads are useful. This was prompted
by some conversations last week with some folks. Comments, questions
and criticisms welcome.
http://intensivesystems.net/tutorials/why_monads.html
Jim
--
You received this message because you are subscribed to the Google
Grou
On 21 dec, 15:38, kyle smith wrote:
> Martin, you're trying to argue that some hypothetical 'unwashed
> masses' of programmers won't like clojure because of parenthesis. The
> problem is you're just assuming it's the parenthesis, and there is no
> way to know for sure (short of a peer-reviewed st
What eval does, is wrapping (fn* [] ) around its
arguments, compiling that, and calling the resulting function object
(except if your list starts with a 'do or a 'def).
While Clojure's compiler is pretty fast, you should try not to use
eval. If you want to pass code around you should try something
Sorry, I somehow accidentally sent it before I was done typing. The
rest of my sentence was "what are you trying to do thar requires the
use of evals in that way".
On Dec 21, 4:22 pm, rob wrote:
> It sounds like your use of evals might be something that could be done
> better using a more idioma
It sounds like your use of evals might be something that could be done
better using a more idiomatic clojure approach. What are you trying
to do that re
On Dec 21, 2:32 pm, Gabi wrote:
> Hi
> I have this program that needs to do many eval's to same expression
> (eval '(some-list-to-execut..))
>
It sounds like your use of evals might be something that could be done
better using a more idiomatic clojure approach. What are you trying
to do that re
On Dec 21, 2:32 pm, Gabi wrote:
> Hi
> I have this program that needs to do many eval's to same expression
> (eval '(some-list-to-execut..))
>
Hi
I have this program that needs to do many eval's to same expression
(eval '(some-list-to-execut..))
My question is how can this be optimized ? Does eval compile the
evaled expression ? Does it re-compile the evaluated expression again
and again? Maybe I could compile the evaled expression once
Hi Rob,
Thanks for your helpful reply. I have finally had success.
On Dec 20, 7:10 pm, Rob Wolfe wrote:
> Are you really sure that function `copy-to-jar` looks exactly like this:
> ...
> I mean `unix-path` function is called twice not only once.
Evidently not.
So I started from fresh again, jus
Thanks Newman
Useful link!
I'm doing a lot of SIP as well, and I even have a (not so) secret plan
to extend this to create a simple SIP UA simulation.
On Dec 21, 8:57 pm, Richard Newman wrote:
> > I would appreciate your feedback on the code, improvement suggestions
> > or any other input.
>
> T
> newLISP
I've seen enough about newLISP to not bother.
http://lambda-the-ultimate.org/node/257#comment-1901
http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/39a9e50aa548637f
http://eli.thegreenplace.net/2006/04/20/newlisp-an-intriguing-dialect-of-lisp/
--
You received this
> I would appreciate your feedback on the code, improvement suggestions
> or any other input.
This is fantastic, thank you for sharing! I do SIP during the day, so
this will come in handy.
See also
http://www.websequencediagrams.com/
which does a good job for producing images.
--
You receiv
> http://www.flickr.com/photos/nakkaya/4200386988/in/set-72157623036408444/
>
> I would very much like to hear your feedback on the code.
I watched the movie -- very cool stuff! Great way to spend a weekend :)
I only skimmed your code. It looks pretty decent, though there are
opportunities for
newLISP
On Sun, 2009-12-20 at 12:31 -0800, Sean Devlin wrote:
> Hi everyone,
> After hacking Clojure for a while, I've come to the conclusion that
> studying a second Lisp would help. So, what do the people here
> think? What is a good Lisp to study? Are there particular dialects &
> distributi
On Fri, Dec 18, 2009 at 5:35 PM, Vagif Verdi wrote:
> There a binary protocol library http://hessian.caucho.com/
+1
(also, there's a functionally equivalent text protocol, burlap, if you
need human readability in some situations, say development or
debugging. A common idiom is to use Burlap in
instant second lisp: just write your own interpreter
On Sun, Dec 20, 2009 at 6:39 PM, Jonathan Smith
wrote:
> Lisp Flavored Erlang is an extremely interesting lisp. in my opinion.
>
> You get Erlang, and you also get s-expressions and macros.
>
> Common Lisp and Scheme are the obvious choices, I
Martin, you're trying to argue that some hypothetical 'unwashed
masses' of programmers won't like clojure because of parenthesis. The
problem is you're just assuming it's the parenthesis, and there is no
way to know for sure (short of a peer-reviewed study). Maybe java
programmers don't know abou
On Dec 20, 7:22 pm, nathaniel wrote:
> Does anyone know of Clojure features
> which rely on Java features that would be prohibitively difficult to
> implement in C++?
You might run into the problem than any C++ garbage collector you find
will probably not be quite as efficient as the JVM's garbag
I also vote for static analysis. People have combined static analysis
with data mining to predict software defects.
http://scholar.google.com/scholar?hl=en&q=data+mining+software+defects&btnG=Search&as_sdt=2000&as_ylo=&as_vis=0
However, it doesn't look like anyone's tried it with any functional
la
Hey all,
During my day job, I often need to create call flows (sequence
diagrams).
For formal documents, I mostly used Visio or EventStudio, but when I
need something quick and dirty in pure ASCII, these tools are too
heavy.
For a while I use my own simple CL solution, and now I ported it to
Clojur
32 matches
Mail list logo