>> Do you have examples of where you see it interesting to use (and not
>> abuse :-) ) side effects in combination with eager/patient ?
>
> I just checked in a Swing usage example which uses side effects to
> update the UI (http://github.com/gcv/dgraph/blob/master/src/examples/
> dgraph/swing.clj).
2010/1/16 Simon Brooke :
> general case of a cyclic directed graph. Surely there must be some
> clean idiomatic way of creating a cyclic graph?
I experimented with something very similar when I first encountered Clojure:
http://clojure.googlegroups.com/web/funmud.clj
And ended up representing the
I really needed an update-in! version that works on transients. I
couldn't find one so I just modified the original update-in core (just
replaced "assoc" "assoc!"):
(defn update-in!
"modified version of core/update-in that works on, and return
transients"
([m [k & ks] f & args]
(if ks
Forgot to mention that v in the example is defined to [[1 2] [3 4]]
On Jan 17, 3:19 pm, Gabi wrote:
> I really needed an update-in! version that works on transients. I
> couldn't find one so I just modified the original update-in core (just
> replaced "assoc" "assoc!"):
>
> (defn update-in!
>
On Sun, Jan 17, 2010 at 8:25 AM, Gabi wrote:
>>
>> user=> (persistent!(update-in!(transient v) [0] reverse))
>
> Forgot to mention that v in the example is defined to [[1 2] [3 4]]
So you've got a transient vector of persistent vectors of
numbers. The problem is your update-in! then calls assoc
Right. I thought that transient performing deep 'transientivity'.
Here is a fixed version. It takes a regular coll converts whatever it
can to transient and update the stuff.
The problem is that doing persistent!(assoc!(transient m)) on each
level probably misses the whole point of performance.
So
Currently, if the result of the multiplication is too small, then the
type will be double, despite the fact that one of the parameter was
BigDecimal:
Clojure 1.1.0
user=> (* 100M 1.1)
110.01
user=> (class (* 100M 1.1))
java.lang.Double
Such thing are really hard to find and this can b
But how?:)
On Dec 22 2009, 1:36 pm, Alex Ott wrote:
> Resolved, thanks to peoples from #clojure
>
> Alex Ott at "Tue, 22 Dec 2009 11:03:28 +0100" wrote:
> AO> Hello
>
> AO> I'm currently playing with closure-templates, and have one question - to
> AO> load template, i need tocreateinstanceofc
Hi,
Can you guys recommend any good books, articles or code on
concurrency? I'm new to concurrency issues, and just finished the
Halloway book, so it would be great to have an introductory reference
with lots of examples of how to make your CPUs all work happily
together. Bascally, I'd like to r
Anyone have some suggestions for active clojure projects to watch/get
involved with on github?
--
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
Just started learning Clojure a day ago with Stuart's book I found
that Clojure doesn't do tail recursion optimization, not at least for
the most simplest form. Instead the call must be made to recur instead
of the function itself.
However in the more-or-less-the-same-camp Scala does such optimiza
It would be really great to have clojure on spoj! Thanks.
2010/1/15 sphere research
> Hi,
>
> test Clojure on ideone.com
> (more: http://www.facebook.com/pages/ideone/245768360841)
>
> see the example: http://ideone.com/Aymq9Tg4
>
> if you wish, we could install Clojure on spoj.pl,
>
> regards,
Ugly is in the eye of the beholder :), but anyway, I got curious and
dug up some info on scala's recursion:
http://blog.richdougherty.com/2009/04/tail-calls-tailrec-and-trampolines.html
On Jan 17, 7:39 am, itsnotvalid wrote:
> Just started learning Clojure a day ago with Stuart's book I found
>
> Bascally, I'd like to read a whole book about it relevant
> to Clojure. (Or maybe relevant to Java.)
I have heard Rich recommend 'Java concurrency in practice' in one of
his talks. You could take a look at that.
-
Abhijith
--
You received this message because you are subscribed to the Google
I was wondering about that myself but was too embarrassed to ask :)
On Jan 17, 8:39 am, itsnotvalid wrote:
> Just started learning Clojure a day ago with Stuart's book I found
> that Clojure doesn't do tail recursion optimization, not at least for
> the most simplest form. Instead the call must b
On Sat, Jan 16, 2010 at 23:13, Jevgeni Holodkov
wrote:
> Currently, if the result of the multiplication is too small, then the
> type will be double, despite the fact that one of the parameter was
> BigDecimal:
>
> Clojure 1.1.0
> user=> (* 100M 1.1)
> 110.01
> user=> (class (* 100M 1.
On Jan 13, 11:53 pm, Stuart Halloway
wrote:
> >> I would like for logging to be less magical in its implementation.
>
> > I don't see the leveraging of macro evalutaion to be "magic"; I view
> > it as a great advantage of clojure to not be limited to only compile-
> > time and run-time (given th
For now, I just want to get the most useful stuff into git.
Patch submitted:
http://www.assembla.com/spaces/clojure-contrib/tickets/58
On Jan 13, 5:03 pm, Timothy Pratley wrote:
> Hi Alex,
>
> 2010/1/13 ataggart :
>
> > You mean dropping it from the level-specific macros such as error and
> > fa
On Sat, Jan 16, 2010 at 03:30:49PM -0800, Sergey wrote:
But how?:)
Use a '$' character to delimit the internal class.
... (:import com.google.template.soy.SoyFileSet$Builder) ...
... (new SoyFileSet$Builder) ...
That's the real class name. It's fairly easy to figure this out by
looking
On Sat, Dec 12, 2009 at 4:30 PM, Michael Kohl wrote:
> So if you have something you want to share with the wider Clojure community,
> just fork away and send me a pull request on GitHub.
Scott Haug did just that and the help text of the clj wrapper script
gives you a pretty good idea about all th
Other people prefer having a form to explicitly request recursion.
That way, you are able to say explicitly in your code: I expect this
to be TCO-able, and have the compiler tell you if you are mistaken.
Another advantage of the explicit form is that it can be used
anonymously with `loop` a
Even if Java and thus Clojure eventually adds TCO, I hope recur sticks
around, because I have come to prefer loop-recur syntax for the kinds
of things I do with named let in Scheme.
TCO would certainly be useful, though.
--
You received this message because you are subscribed to the Google
Groups
On Fri, Jan 15, 2010 at 8:22 PM, Julian wrote:
> Matt Raible - Spring Expert and Java consultant posted the following
> entry to Twitter:
> "Why is Clojure better than Scala or Groovy?"
How about two reasons to learn Clojure instead?
1) Clojure is (a) LISP. According to Eric Raymond, "LISP is wo
If you're looking for fun and practice, you could fork this wari game
and try adding a computer player.
http://ericlavigne.net:8054/
http://github.com/ericlavigne/island-wari
On Sat, Jan 16, 2010 at 11:02 PM, Tchalvak wrote:
> Anyone have some suggestions for active clojure projects to watch/ge
> 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
I don't think you can really answer the question because it being asked in
the way it that precludes a good enough answer. The tone of Matt Raible's
request suggests that he'd really rather not learn it, and that there's no
possible reason to overcome that reluctance.
Why travel? There's plenty of
On Jan 17, 4:05 am, Albert Cardona wrote:
> The link gives a "not found"--did you push?
I did, but then I moved the examples directory around to make
everything more Leiningen-layout-friendly. Here is the updated link:
http://github.com/gcv/dgraph/blob/master/examples/examples/dgraph/swing.clj
P
Using the clojars repo from leiningen works fine for me, just using
[dgraph "1.0.0"].
I've done most of my little swing app I needed to get done and dgraph
has been very pleasant.
However I found myself wanting to put a map in the graph because I had
a function for updating the gui that depended on
Hi all, first time caller here.
Came back to check in on this thread due to some interest in the library
that Mac has been working on - and the discussion about Objective-C/Cocoa
interfacing has prompted me to break cover with something I've been hacking
around on for the past few weeks.
Basicall
Hi all,
I've been hacking on a bridge between Clojure and Cocoa, and have been
prompted to break cover by recent discussion of the subject of Objective-C
interfacing here on this list.
The code is strictly "demo" or "proof of concept" quality right now - the
example code and the unit tests work,
30 matches
Mail list logo