Hi Korny,
That is a very interesting question to me, specifically this part:
> how do I stop parallel
> changes to two unrelated structures in the world from causing transaction
> retries?
Actually I don't think you can ever rule out retries if you are using
a ref (or atom) and more than one t
On 31.03.2009, at 21:48, Konrad Hinsen wrote:
> On 31.03.2009, at 18:50, Mark Engelberg wrote:
>
>> On Tue, Mar 31, 2009 at 9:45 AM, Konrad Hinsen
>> wrote:
>>> I think this should be sufficient to cover all cases you mentioned,
>>> but of course it needs to be tried in practice.
>>
>> I think y
Hello Korny,
I share your questioning.
On 1 avr, 06:57, Korny Sietsma wrote:
> (A) one ref for the whole world - in which case how do I stop parallel
> changes to two unrelated structures in the world from causing transaction
> retries?
In this case, I wonder whether to extend "ensure" so as t
Just last week I finally got my "Advanced Practical Recursion in Lisp
1.0" kit from Y-Combinator Technologies, Inc. (not Paul Graham's
company). They have this amazing product that I think we can use in
Clojure. I'm not supposed to share the source code, but I can trust
you folks right?
T
Just a quick note to say that I've added notes about the TextMate
Clojure bundle to my tutorial. I've also put a concise version of the
guide up on GitHub:
http://github.com/mreid/clojure-framework/tree/master
Regards,
Mark.
--
http://mark.reid.name
--~--~-~--~~~
I came across a thread from Jul '08 which seems to be the definitive
on handling side-effects within transactions -
http://groups.google.co.za/group/clojure/browse_thread/thread/d645d77a8b51f01/667e833c1ea381d7
Adrian.
On Wed, Apr 1, 2009 at 9:24 AM, Timothy Pratley
wrote:
>
> Hi Korny,
>
>
> T
On Mar 31, 11:33 pm, Attila Babo wrote:
> Hey, here is another clojure user from Copenhagen. I'm a Hungarian but
> living here so please count me in!
Cool. I guess I will be arranging our first meeting at JAOO.
Keep an eye on the site for other dcug news.
-- Karl
--~--~-~--~~-
On Wed, Apr 1, 2009 at 6:00 AM, David Sletten wrote:
> [snip]
>
> Here's 'length' again:
> (((fn [m]
> ((fn [future]
>(m (fn [arg]
> ((future future) arg
> (fn [future]
>(m (fn [arg]
> ((future future) arg ))
> (fn [rec]
> (fn [l]
>
On Apr 1, 5:46 am, Christophe Grand wrote:
> Hello Korny,
>
> I share your questioning.
>
> On 1 avr, 06:57, Korny Sietsma wrote:
>
> > (A) one ref for the whole world - in which case how do I stop parallel
> > changes to two unrelated structures in the world from causing transaction
> > retri
Another Danish user here,
I am in Copenhagen. I can only support the initiative but i dont think
it will be possible to put so much effort into it.
I am mostly a casual user, using clojure for ad hoc processing /
conversion of various text file formats (like edifact, swift, xml ..)
in connectio
On Apr 1, 6:57 am, Korny Sietsma wrote:
> I have a world that is a list of structures
>
> The world itself will change occasionally - i.e. I'll add or remove
> structures from the overall list, and I'll regularly be reading the whole
> list.
> (C) both of the above - a ref for the "world" list w
On Wed, Apr 1, 2009 at 12:00 PM, David Sletten wrote:
> [snip]
> I'm going to move forward with the negotiations, but I need to know
> if you, the Clojure community, are on board here. Ultimately the
> decision is going to come down to whether or not you find the APRiL
> 1.0 technology useful. T
While we speak about function composition (or not),
you can also use the partial function creator to obtain "point-free" (no
need for anonymous function with formal argument declaration or use) code:
And with the use of comp, you could define the function without even
explicitly naming any formal
comp seems more appropriate here.
On Mar 31, 11:52 pm, kkw wrote:
> Hi folks,
>
> I have some code where I wanted to:
> - take a list of stuff (which includes another list inside)
> - use 'seq-utils/flatten' to flatten the list
> - use 'interpose' to add comma-delimiting strings between the
On Mar 31, 12:45 pm, Konrad Hinsen wrote:
> On Mar 31, 2009, at 16:32, Rich Hickey wrote:
>
> > Here are some problems/limitations of existing OO/GF systems that I
> > don't intend to repeat:
>
> ...
>
> I agree that these are not desirable features. I have had to work
> around some of them man
Hi,
I wanted to use clojure for some scripting-like tasks (mostly
experimenting with clojure's abilities).
But I found, that clojure's startup time is too bad to do that.
So I implemented a client-server architecture which works pretty much
like clojure's default
clojure.main.
I'd be glad if you
I've been going through Stuart Halloway's book, _Programming Clojure_,
and thinking about his deftarget macro has brought up some questions
as to how macros and special forms interact in clojure. The deftarget
macro needs to produce a "def" form that has metadata on its first
argument, wh
On Apr 1, 2009, at 14:47, Rich Hickey wrote:
> I've added get-method (SVN 1338).
Great, thanks!
> Note how you can name methods for diagnostic purposes. This doesn't
> introduce names into the namespace, just puts a name on the fn object.
It's also useful for recursive calls, if you are sure y
On Wed, Apr 1, 2009 at 8:28 AM, christ...@mvonessen.de
wrote:
>
> Hi,
>
> I wanted to use clojure for some scripting-like tasks (mostly
> experimenting with clojure's abilities).
You might be interested in taking a look at nailgun:
http://www.martiansoftware.com/nailgun/index.html.
For example,
On Apr 1, 2009, at 16:28, Kevin Van Horn wrote:
> But
>
>(def (wmd x {:a 1}) 37)
>
> gives me an error: "Second argument to def must be a Symbol". This
> confuses me. Doesn't macro expansion happen entirely before
> evaluation? So before the def special form is evaluated, (wmd x {:a
> 1}) s
I like it, though I would prefer the more concise function "y" (lower
case).
--~--~-~--~~~---~--~~
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
To unsubscr
No change. I think made a small script that spends a large amount of
time in java.lang.reflect.Array.setInt too:
(set! *warn-on-reflection* true)
(time
(dotimes [_ 1]
(let [#^ints arr (int-array 200)]
(dotimes [i 200]
(aset-int arr i i)
So maybe I should try to see what
On Wed, Apr 01, 2009 at 10:42:02AM -0400, Victor Rodriguez wrote:
>
> On Wed, Apr 1, 2009 at 8:28 AM, christ...@mvonessen.de
> wrote:
> >
> > Hi,
> >
> > I wanted to use clojure for some scripting-like tasks (mostly
> > experimenting with clojure's abilities).
>
> You might be interested in tak
On Apr 1, 2009, at 16:42, Victor Rodriguez wrote:
> You might be interested in taking a look at nailgun:
> http://www.martiansoftware.com/nailgun/index.html.
I had tried nailgun a while ago, and still use it from time to time,
but I found that for code development it has a significant
disadv
Very cool.
On Wed, Apr 1, 2009 at 8:47 AM, Rich Hickey wrote:
>
>
> I've added get-method (SVN 1338).
>
> (derive ::Circle ::Shape)
> (derive ::Rect ::Shape)
>
> (defmulti area :Shape)
>
> ;note - you can name methods
> (defmethod area ::Shape area-shape [x] nil)
>
> (get-method area ::Rect)
> #
On Mar 28, 8:24 pm, Stuart Sierra wrote:
[snip]
>
> Also, if you're using SLIME, you lose line numbers every time you
> evaluate a form in the buffer. Type
> (require your.namespace :reload) at the REPL to get them back.
>
This advice did not work for a situation I am encountering now and
enc
I can't give you any numbers on #2, but I have used both languages and there
is no comparison. Groovy is freakishly slow. Clojure is relatively zippy.
On Wed, Apr 1, 2009 at 11:41 AM, Chanwoo Yoo wrote:
>
> Hello. Yesterday, I talked with a representative of a publisher about
> a translation o
Hello. Yesterday, I talked with a representative of a publisher about
a translation of Lisp books. There are books about Ruby, Lua, Erlang,
and Groovy in South Korea, but there is no book about Lisp except
SICP. So he is considering printing the first Lisp book in South
Korea. We talked about 'Pro
> 3. Clojure can use Java libraries. Common Lisp can use C/C++
> libraries. Is it possible to say Clojure has strong points to Common
> Lisp in the power of libraries?
Accessing Java from Clojure is easier & more transparent than accessing C
from Common Lisp.
Joshua
On Wed, Apr 1, 2009 at 6:41 PM
On Apr 1, 10:43 am, hughw wrote:
> On Mar 28, 8:24 pm, Stuart Sierra wrote:
> [snip]
>
>
>
> > Also, if you're using SLIME, you lose line numbers every time you
> > evaluate a form in the buffer. Type
> > (require your.namespace :reload) at the REPL to get them back.
>
> This advice did not w
Not an April Fool's joke! New lib "clojure.contrib.test-is.tap" adds
Test Anything Protocol (TAP) support to test-is. Use it like this:
;; (use 'clojure.contrib.test-is)
;; (use 'clojure.contrib.test-is.tap)
;;
;; (with-tap-output
;;(run-tests 'my.cool.library))
Warning: this doesn't
On Wednesday 01 April 2009 16:51:49 Joshua Fox wrote:
> > 3. Clojure can use Java libraries. Common Lisp can use C/C++
> > libraries. Is it possible to say Clojure has strong points to Common
> > Lisp in the power of libraries?
>
> Accessing Java from Clojure is easier & more transparent than acce
On Apr 1, 10:53 am, hughw wrote:
> I retract my comment! Although I agree with the sentiment that
> improvederrorreportingwould be great, I'm unsure exactly what I
> want.
>
Clarification:
In the SLIME repl I invoke my function. It reports the error as
java.lang.ClassCastException: java.lang
Hi Stuart,
Stuart Sierra wrote:
> Not an April Fool's joke! New lib "clojure.contrib.test-is.tap" adds
> Test Anything Protocol (TAP) support to test-is. Use it like this:
>
> ;; (use 'clojure.contrib.test-is)
> ;; (use 'clojure.contrib.test-is.tap)
> ;;
> ;; (with-tap-output
> ;;(ru
On Wed, Apr 01, 2009 at 05:27:55PM +0200, Konrad Hinsen wrote:
> I haven't tried Christian's Clojure-specific server yet, but if it
> solves that problem, I'll probably adopt it.
>
Sadly it doesn't. I could experiment with a custom classloader, though.
For testing, such a server doesn't help
On Wed, Apr 1, 2009 at 9:10 AM, hughw wrote:
> I don't mind scrolling through the long stack crawl to discover where
> my error is. but I do wish the initial error report could somehow give
> me the information, rather thanrequiring the two step process (and
> switching windows when using the sli
On Mar 31, 1:00 pm, martin_clausen wrote:
> I would certainly be interested. Lau are you out there ?
>
> /mac
>
Ping! Yea I'm out here - My activity on the Google Group is very
limited, but an assembly at JAOO with Rich igniting would definitely
be interesting - I would consider arranging a tr
Let's say I *hate* dealing with Java classpaths, especially within
IDEs.
Somehow, it's always the hardest configuration part of setting up a
project.
Let's add I want to use clojure + clojure.contrib.
If my mileage is representative at all of most newcomer's experiences
trying to get acquainted
I have no experience with gradual typing, but I'd love to try it. It
seems there are many situations where dynamic typing just makes things
easier than in a language like Haskell, however I long for their
ability to verify correctness at compile time.
Vince
On Mar 29, 10:49 am, André Thieme wr
On Apr 1, 12:21 pm, Jason Sankey wrote:
> Out of interest, are you interested in other output formats for test-is?
> I chose JUnit compatible as a defacto-standard -- it integrates with
> the unofficial build server I have been working on as well as many other
> tools. I have it working but in
Hi,
Am 01.04.2009 um 21:22 schrieb Daniel Jomphe:
If my mileage is representative at all of most newcomer's experiences
trying to get acquainted with clojure, this is very bad: all the
following editors have a plugin for clojure, but none of them comes
with an easy way to add clojure.contrib to
On Apr 1, 8:16 pm, Lau_of_DK wrote:
> Keep me posted please, if this turns into something concrete
Looks like we've got enough to get a user's group started -- great!
Seems most people are in cph, and I am in Aarhus :-(, but that should
be no problem.
I know Rich was invited for JAOO at QCon
For one example of how to set up libraries so they can find each
other, Stuart Halloway's *Programming Clojure* has a sample code bundle at
http://www.pragprog.com/titles/shcloj/source_code. This is arranged in
directories and includes scripts for executing the code. Clojure contrib is
there among
On Wed, Apr 1, 2009 at 9:57 PM, Krukow wrote:
>
>
>
> On Apr 1, 8:16 pm, Lau_of_DK wrote:
>> Keep me posted please, if this turns into something concrete
>
> Looks like we've got enough to get a user's group started -- great!
> Seems most people are in cph, and I am in Aarhus :-(, but that shoul
Thanks for the feedback everyone!
Kev
On Apr 1, 11:38 pm, Rayne wrote:
> comp seems more appropriate here.
>
> On Mar 31, 11:52 pm, kkw wrote:
>
> > Hi folks,
>
> > I have some code where I wanted to:
> > - take a list of stuff (which includes another list inside)
> > - use 'seq-utils/flat
Hi,
user=> (use 'clojure.contrib.lazy-xml)
nil
user=> (emit '{:tag :foo :attrs {:a "b" :c "d"} :content
({:tag :bar :attrs {:e "f"} :content ({:tag :baz :attrs nil :content
("hello")})})} :pad true)
hello
nil
The 'foo' element is getting the requested padding, but it does not
propagate to th
On Apr 1, 3:23 pm, Vincent Foley wrote:
> I have no experience with gradual typing, but I'd love to try it. It
> seems there are many situations where dynamic typing just makes things
> easier than in a language like Haskell, however I long for their
> ability to verify correctness at compile
Hi,
I'm currently in Copenhagen so I'm definitely interested.
-Roland
--~--~-~--~~~---~--~~
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
To unsubscribe fro
i ended up bagging all IDE's for now and did this:
http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started
up through "Installing Clojure.contrib."
my hardest part was getting rlwrap to compile on my mac. my macports
environment is all messed up so I had to do some hacking (and probably
Isn't this supposed to work?
(defn create-layout []
(proxy [java.awt.LayoutManager] []
(addLayoutComponent [name comp]
(println "Called addLayoutComponent"))
(removeLayoutComponent [comp]
(println "Called removeLayoutComponent
Ugh, I hate it when I make a fool of myself and realize the answer to
a question 1 minute after posting it, even when wrestling with it for
an hour beforehand...
The reason the example doesn't work is that the method is of a
different arity than the one I'm attempting to call.
Still doesn't expl
has the Clojure Box type of thing appeared for non-Windows systems?
(googling says no.)
--~--~-~--~~~---~--~~
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
T
Emacs built with the emacs-starter-kit from
http://github.com/technomancy/emacs-starter-kit/tree/master gets both
clojure and clojure.contrib set up correctly.
To use other jars, I had to hack the emacs-starter-kit stuff slightly; it
seems that swank-clojure by default adds all jars in "~/.clojure
While still learning clojure, I often times need a function and am not
sure if it already exists or where to look for it. I thought it would
be useful to be able to give a return value and arguments and search
all functions for ones which return the given value when called with
the given argument
Thanks. I think the problem was I was assuming somehow I could keep track
of my individual structures by some sort of object reference, independent of
their position in the world - woolly object-oriented thinking - which was
confusing me.
If I instead have a key (or query function) that finds a s
I've been playing around with rendering a mandelbrot set, and using
pure java it renders about 2 seconds on my machine, however it runs
about 10 times as slow in clojure, I was curious if I'm doing anything
obviously wrong, or if it's just life :) I do run it with the -server
flag, which does impr
Good stuff - but I'm surprised you link to Phil Hagelberg's port of
clojure-mode, but not to his emacs-starter-kit:
http://github.com/technomancy/emacs-starter-kit/tree/master
If you are going down the emacs path, but don't already have your own emacs
setup, I highly recommend the starter kit -
>From a quick glance, I think the lack of type hints is what's slowing
down your Clojure code.
You can set the global variable *warn-on-reflection* to true, to get a
sense of where to add your type hints.
-Patrick
--~--~-~--~~~---~--~~
You received this message be
On Mar 26, 6:24 pm, mikel wrote:
> How would you write bound?
(defmacro bound? [nm & [the-ns]]
`(let [nm-nsname# (namespace '~nm)
the-ns# (if nm-nsname#
(find-ns (symbol nm-nsname#))
(or ~the-ns ~clojure.core/*ns*))
nm# (symbol (name '~
I actually tried forcing the type hints and didn't really see a
noticeable improvement, just made the code hard to read for the most
part.
On Apr 1, 9:57 pm, CuppoJava wrote:
> From a quick glance, I think the lack of type hints is what's slowing
> down your Clojure code.
> You can set the globa
On Apr 1, 9:40 pm, Dmitri wrote:
> I've been playing around with rendering a mandelbrot set, and using
> pure java it renders about 2 seconds on my machine, however it runs
> about 10 times as slow in clojure, I was curious if I'm doing anything
> obviously wrong, or if it's just life :) I do run
I'm running it as a script with:
java -server -cp clojure.jar clojure.lang.Script mandelbrot.clj
as I mentioned earlier, I did try forcing all the primitives, but
didn't notice
much of a difference, I did try running the draw method repeatedly to
make sure it wasn't just the startup times causin
I have used Java and Jsp for many years as the platform for my
business offerings. All new development is now being done in Clojure -
I am comfortable (nay, delighted) with it's stability and viability.
On Wed, Apr 1, 2009 at 6:12 PM, Jon Harrop wrote:
>
> On Wednesday 01 April 2009 16:51:49 Jo
I'm running it as a script with:
java -server -cp clojure.jar clojure.lang.Script mandelbrot.clj
as I mentioned earlier, I did try forcing all the primitives, but
didn't notice much of a difference, I also did try running the draw
function repeatedly to make sure it wasn't just the startup times
...for easy dependency management and no-compile project setup.
https://github.com/dysinger/clojure-pom/tree
Using maven only for the dependency management and to create a custom
repl script allows me to still use emacs/slime for dynamic development
of clojure code.
My motivation is 3 fold:
1)
Dogh! Plz pardon my spelling. :D (embarrassed)
On Apr 1, 7:25 pm, dysinger wrote:
> ...for easy dependency management and no-compile project
> setup.https://github.com/dysinger/clojure-pom/tree
>
> Using maven only for the dependency management and to create a custom
> repl script allows me to
I did this:
(defn draw [#^Canvas canvas]
(let [#^BufferStrategy buffer (. canvas getBufferStrategy)
#^Graphics g (. buffer getDrawGraphics)]
(doseq [y (range 0 *height*)]
(let [dy (- 1.5 (* 2.5 (/ y *height*)))]
(doseq [x (range 0 *width*)]
(let [dx (-
On Apr 2, 12:27 am, dysinger wrote:
> Dogh! Plz pardon my spelling. :D (embarrassed)
>
> On Apr 1, 7:25 pm, dysinger wrote:
>
>
>
> > ...for easy dependency management and no-compile project
> > setup.https://github.com/dysinger/clojure-pom/tree
>
> > Using maven only for the dependency mana
68 matches
Mail list logo