I know it is not the done thing but I have a question regarding js*
I have a complex fn defined in a javascript file. it is self contained and
uses no globals.
It is not currently worth my while to rewrite.
I can use this by doing:
(def my-fn (js* ...file contents with escaped chars...))
and
currently md5, sha1, sha356
* clojars [cljs-hash 0.0.1]
* github https://github.com/davesann/cljs-hash
Dave
--
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
Hi,
I'm post the question at clojure group because I am looking for way to
solve a problem which clojure's persistent data structure seem fit.
I am use CLR (C#) as programming language and I'm developing a simulation
application. Without going to much into detail the simulation involve
Thanks Alan.
Hope this will be changed.
On 2月14日, 上午3时06分, Alan Malloy a...@malloys.org wrote:
If this is a bug, it's in eval, not in map. eval apparently just
doesn't like to be handed lazy sequences, or something:
repl-1= (eval `(quote ~(lazy-seq nil)))
CompilerException
Hi,
I am new to clojure and I am very excited about learning the
language. I have a question about replacing an element in a list. I
have elements that look like this :
{:id G__781, :value 1}
The list looks like this:
({:id G__821, :value 1} {:id G__820, :value 1} {:id G__819, :value 1}
To redeem myself for the noob threading mistake, *I've implemented Var and
friends in ClojureScript*:
https://github.com/brandonbloom/clojurescript/compare/8ba4849e60e5957cdac36ef6946c647e824ca3c8...vars
This branch includes (almost) the full set of relevant functionality, but
for performance
Is that a good way to go? I couldn't find much documentation about how to
create full immutable application.
I understand I'm mixing functional and OO principles, I hope I'm not to
wrong about it.
I've done more or less this exact thing in C# before. What I've found
to be most useful, is to
On Mon, Feb 13, 2012 at 5:16 PM, James jegathi...@gmail.com wrote:
Hi,
I am new to clojure and I am very excited about learning the
language. I have a question about replacing an element in a list. I
have elements that look like this :
{:id G__781, :value 1}
The list looks like this:
I have released nREPL 0.2.0-beta1, which should show up in Maven central soon.
For those that don't know, nREPL is a Clojure network REPL that provides a
REPL server and client, along with some common APIs of use to IDEs and other
tools that may need to evaluate Clojure code in remote
Thanks, Alan,
The solution I used looks exactly like yours:
(defn mktree [vz [i out?]]
(if out?
(- vz (zip/append-child i) zip/up )
(- vz (zip/append-child [i]) zip/down zip/rightmost)))
(defn as-tree [tracelist]
(zip/root (reduce mktree (zip/vector-zip []) tracelist)))
Thinking
I'd use clojure.core/replace
It takes a replacement-map in the form of {before after, ...} and a
collection. It replaces all befores with the corresponding afters:
= (replace {:answer 42} [:the :answer :to :life])
[:the 42 :to :life]
On Mon, Feb 13, 2012 at 23:16, James jegathi...@gmail.com
Here's a new blog post describing the effect the improved fork-join pool
has had on Akka actors:
http://letitcrash.com/post/17607272336/scalability-of-fork-join-pool
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email
This is interesting. However it seems, at least to me, like a big change
with too little justification. When you're CA is in, please setup a design
document for this line of development -
http://dev.clojure.org/display/design/ClojureScript.
David
On Tue, Feb 14, 2012 at 5:15 AM, Brandon Bloom
I don't think ClojureScript is going to support what you want, js* is an
implementation detail - not something for general use. You can however
provide your own special form that does what you want. The ClojureScript
compiler is built on top of multimethods so you can just add parse/emit
cases for
I guess the use of domonads leaves behind do statements with m_bind's and
m_result's... and since these expressions are not fn's, they don't count as
method calls and are thus not part of the stack trace. But if I'm mistaken
or if anyone has figured out how to use monads and still get detailed
or there are some in goog.cryptwhich I didn't see when I did this...you
won't find sha356 though - that's special :)
--
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
Ok, I'll leave it for now, but that is good to know.
thanks
Dave
--
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
Hi,
I've just been brushing up my knowledge about clojure multimethods and was
wondering about an example at http://clojure.org/multimethods (see below).
What I don't get is how a (class []) gets dispatched to ::collection.
(class []) returns clojure.lang.PersistentVector which doesn't seem to
On Tue, Feb 14, 2012 at 3:14 PM, László Török ltoro...@gmail.com wrote:
What I don't get is how a (class []) gets dispatched to ::collection.
(class []) returns clojure.lang.PersistentVector which doesn't seem to
satisfy the isa? relationship.
(defmulti foo class)
(defmethod foo
Hi,
the ancestor chain seems to be:
c.l.PersistentVector - c.l.APersistentVector - j.u.List - j.u.Collection
Meikel
--
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
Damn, I missed that, it's getting late, thanks!
2012/2/14 Aaron Cohen aa...@assonance.org
On Tue, Feb 14, 2012 at 3:14 PM, László Török ltoro...@gmail.com wrote:
What I don't get is how a (class []) gets dispatched to ::collection.
(class []) returns clojure.lang.PersistentVector which
Hi,
Saw that the video was available in the podcast feed but it stops
playing around 13:40 looked on blip tv and it does something similar.
Is someone aware of the issue? I'd love to see the end of the talk.
Thanks.
Julio
--
You received this message because you are subscribed to the Google
Can we continue the conversation on this thread while my CA waits on the
USPS?
Three things to cover: 1) motivation 2) design 3) impact
1. Why do I want this? Why would anyone want this?
- Better parity with JVM Clojure
- async Javascript (ie. nearly all Javascript) makes the
A sequence is equal to a list because Clojure defines = to compare similar
collections by their contents. For example, the vector [1 2 3] is equal (by
the = function) to the list (1 2 3).
`eval` calls the Clojure compiler. The compiler operates on lists returned
by the reader, so I would not
I put your notes here, http://dev.clojure.org/display/design/Dynamic+Binding
How are you ensuring that the binding frames are local to a particular
asynchronous block of code and that they are removed when that asynchronous
block of code exits?
David
On Tue, Feb 14, 2012 at 3:41 PM, Brandon
On Tue, Feb 14, 2012 at 5:00 PM, Stuart Sierra
the.stuart.sie...@gmail.com wrote:
A sequence is equal to a list because Clojure defines = to compare similar
collections by their contents. For example, the vector [1 2 3] is equal (by
the = function) to the list (1 2 3).
`eval` calls the
eval doesn't mind lazy seqs as input:
user= (map identity ['quote ()])
(quote ())
user= (class (map identity ['quote ()]))
clojure.lang.LazySeq
user= (eval (map identity ['quote ()]))
()
But it can't handle a form that contains an (evaluated) empty lazy
seq. Another example:
user= (eval `(quote
It occurred to me that ultimately what I want is just a pretty-printed
output that I can put on a webpage and apply syntaxhighlighter to.
I should be able to use a custom pprint dispatch to take this
[[(+ 5 (- 4 2 (* 9 3)) (* 5 (+ 6 3))) nil]
[(- 4 2 (* 9 3)) nil]
[(* 9 3) nil]
[27 true]
[-25
28 matches
Mail list logo