On Wed, Jul 13, 2011 at 02:33, Ghadi Shayban wrote:
>
> I put up a simple demo that implements a piece table data structure in
> Clojure
>
> (This is totally an excuse to use finger trees, which Chris Houser
> implemented and excellently presented at the first conj)
>
> A piece table is good for b
Hi,
I think the culprit is here:
https://github.com/clojure/clojure/blob/5f9d6a02c530a02251197e1b844af37440a6b569/src/clj/clojure/core/protocols.clj#L64
The line "(recur cls (next s) f (f val (first s)))" must be written as
(let [v (f val (first s))]
(recur cls (next s) f v))
for your scenar
On Tuesday, July 12, 2011 6:18:12 PM UTC-7, Chas Emerick wrote:
>
> I hesitate to go even more meta, but since I started the thread, I thought
> I would say:
>
> I talked for a bit in the results post about mailing list threads going
> into the weeds; at least IMO, this one qualifies. It wouldn'
On Jul 10, 10:16 pm, FL wrote:
\> If you replace your
...
> > (defn order-perm [perm]
> > (let [n (count perm)]
...
> with the more compact
>
> (defn order-permo [perm]
> (reduce (fn [order i] (if (= i (next-cycle-leader perm i))
>
Guys, geez, go cure cancer or something.
Kevin
--
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 your
first post.
To
Perhaps this discussion requires its own thread?
Sent via mobile
On Jul 12, 2011, at 10:15 PM, Jeremy Dunck wrote:
> On Tue, Jul 12, 2011 at 10:09 PM, Ken Wesson wrote:
>> On Tue, Jul 12, 2011 at 11:06 PM, Jeremy Dunck wrote:
>>> On Tue, Jul 12, 2011 at 9:47 PM, Ken Wesson wrote:
>>> ...
>>>
On Tue, Jul 12, 2011 at 10:09 PM, Ken Wesson wrote:
> On Tue, Jul 12, 2011 at 11:06 PM, Jeremy Dunck wrote:
>> On Tue, Jul 12, 2011 at 9:47 PM, Ken Wesson wrote:
>> ...
>>> Python's major weakness, in this multicore age, is the global
>>> interpreter lock -- has there been any progress on creati
On Tue, Jul 12, 2011 at 11:06 PM, Jeremy Dunck wrote:
> On Tue, Jul 12, 2011 at 9:47 PM, Ken Wesson wrote:
> ...
>> Python's major weakness, in this multicore age, is the global
>> interpreter lock -- has there been any progress on creating a viable
>> Python breed that has true concurrency?
>
>
On Tue, Jul 12, 2011 at 9:47 PM, Ken Wesson wrote:
...
> Python's major weakness, in this multicore age, is the global
> interpreter lock -- has there been any progress on creating a viable
> Python breed that has true concurrency?
FWIW, Jython and IronPython don't suffer from the GIL.
CPython c
On Tue, Jul 12, 2011 at 3:01 PM, Konrad Hinsen
wrote:
> On 12 Jul 2011, at 15:40, James Keats wrote:
>
>> My humble understanding is that macros complicate composability,
>> whereas monads facilitate it.
>
> The composability issue with macros lies in writing them, not using them.
> Monads are all
On Tue, Jul 12, 2011 at 9:45 PM, Jeremy Dunck wrote:
> On Tue, Jul 12, 2011 at 5:48 PM, Ken Wesson wrote:
> ...
>> It's not hard to think up the likely objections from a lot of people,
>> too, and why they'd be looking for something new:
> ...
>> Python: poor performance
>>
>> Javascript: interpr
On Tue, Jul 12, 2011 at 7:47 PM, Mike Meyer wrote:
>> Another misunderstanding. Many developers working at one physical,
>> co-located computer has the keyboard and monitor as "a single global
>> lock". In the terminal server case there could be a finer locking
>> granularity. As for "still develo
Notice there is no parenthesis before fn in the list definition.
So, it's equivalent to calling ('fn 1 3), ie. calling the Symbol
implementation of AFn, which searches the sym in the first argument and
returns the second arguments in can't find it. That's why it's returning 3.
--
You received t
I think I've found a change in the behavior of reduce function, passing from
1.2.1 to 1.3.0.
Given the following:
(defn lazy []
(lazy-seq
(print "*")
(cons :foo (lazy
(defn show []
(reduce
(fn [r x] (print "!"))
[]
(take 10 (lazy
This is the output of a call to
On Tue, Jul 12, 2011 at 5:48 PM, Ken Wesson wrote:
...
> It's not hard to think up the likely objections from a lot of people,
> too, and why they'd be looking for something new:
...
> Python: poor performance
>
> Javascript: interpreted, so slow; "isn't this just for adding annoying
> ads to web
I hesitate to go even more meta, but since I started the thread, I thought I
would say:
I talked for a bit in the results post about mailing list threads going into
the weeds; at least IMO, this one qualifies. It wouldn't be the worst thing in
the world if it died right here. :-)
Cheers,
- C
If you use vectors instead of lists, you can avoid quoting altogether:
user> (def alist [1 (fn [x y] (+ x y))])
#'user/alist
user> (apply (second alist) [1 3])
4
Regards,
Stuart
On 13 July 2011 08:09, Joop Kiefte wrote:
> Didn't try, but shoudn't (def alist `(1 ~(fn [x y] (+ x y be better?
Recently I sat through a presentation on Jim Weirich's ruby based
rspec-given. I decided to see if it was possible to port it as a set
of macros over clojure.test. Turns out that it was fairly easy to
port the concepts over to clojure.
Link:
https://github.com/ckirkendall/ClojureGiven
Basic Sy
I did just recently port Jim Weirich's ruby based rspec-given to
Clojure. It is a very simple BDD framework build on top of
clojure.test as a set of macros. You can find the link here.
https://github.com/ckirkendall/ClojureGiven
Creighton Kirkendall
On Jul 11, 2:12 pm, Max Weber wrote:
> Hi,
I put up a simple demo that implements a piece table data structure in
Clojure
(This is totally an excuse to use finger trees, which Chris Houser
implemented and excellently presented at the first conj)
A piece table is good for buffer management in a text editor, as it
gets around making change
On Jul 11, 5:44 am, Sunil S Nandihalli
wrote:
> Hello everybody,
> I think a lazy version of shuffle would be a good addtion to the core. I
> tried googling for one and
> foundhttp://ytakenaka.blogspot.com/2011/05/lazy-shuffle-clojure.htmlwhich was
> infact slower than original shuffle and was u
No problem. It's a key piece of one of my own libraries, so thank
goodness it was already there when I found myself needing it.
David
On Tue, Jul 12, 2011 at 3:09 PM, Daniel Janus wrote:
> Hey, thanks for recommending my library! :-)
> Best,
> Daniel
>
> --
> You received this message because
On Tue, 12 Jul 2011 18:20:38 -0400
Ken Wesson wrote:
> On Tue, Jul 12, 2011 at 3:11 PM, Mike Meyer wrote:
> > On Mon, 11 Jul 2011 21:12:20 -0400
> > Ken Wesson wrote:
> >> 2. Many developers, one computer. No "remote storage" and if the
> >> developers are co-located no server; otherwise a term
On Tue, 12 Jul 2011 18:13:57 -0400
Ken Wesson wrote:
> On Tue, Jul 12, 2011 at 2:31 PM, Mike Meyer wrote:
> > You write clearly enough that misinterpretation isn't likely. You were
> > simply making false statements.
>
> I do not do that, and I won't tolerate being called names and
> badmouthed
On Tue, Jul 12, 2011 at 6:27 PM, Tamreen Khan wrote:
> What does something being shiny and new have to do with how good its
> libraries, community, platforms, and support are?
See below.
> Heck, I'd say something being new would detract from it library-wise.
Not necessarily, if it can interoper
For that method, you need a back-quote ` (used in macro definition) in front
of the 1, not a single quote ' (used to make a form data instead of code).
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
this is because in order to use ~ to evaluate the fn, you need to use the
backtick ` instead of the single quote '
Il giorno 13/lug/2011 00.34, "Paul Meehan" ha scritto:
>
> Sorry to repoen the discussion, but I got this:
>
>
> => (def alist '(1 ~(fn [x y](+ x y
> #'user/alist
>
> => (apply (s
Sorry to repoen the discussion, but I got this:
=> (def alist '(1 ~(fn [x y](+ x y
#'user/alist
=> (apply (second alist) '(1 3))
#clojure.lang.Cons cannot be cast to clojure.lang.IFn
(NO_SOURCE_FILE:0)>
On 07/12/2011 23:13, Benny Tsai wrote:
Nice, yes, that works just as well :)
On Tue
What does something being shiny and new have to do with how good its
libraries, community, platforms, and support are? Heck, I'd say something
being new would detract from it library-wise. Sergey's point was that when
someone begins a new project they have the options of all those languages;
Clojur
On Tue, Jul 12, 2011 at 8:55 AM, Sergey Didenko
wrote:
> You know that from inside. A Clojure "outsider" can have a completely other
> point of view.
>
> He can choose between Python
Not new
> server side Javascript
Not new
> new C#
Despite what you just said, not new
> Go
Haven't heard of
On Tue, Jul 12, 2011 at 3:11 PM, Mike Meyer wrote:
> On Mon, 11 Jul 2011 21:12:20 -0400
> Ken Wesson wrote:
>> 2. Many developers, one computer. No "remote storage" and if the
>> developers are co-located no server; otherwise a terminal server. The
>> former is obviously not parallelizable (thoug
Cheers guys - still getting to grips with Clojure, but
getting there.
On 07/12/2011 23:13, Benny Tsai wrote:
Nice, yes, that works just as well :)
On Tuesday, July 12, 2011 4:09:09 PM UTC-6, LaPingvino wrote:
Didn't try, but shoudn't (def alist `(1 ~(fn [x y] (+
x y be better? The
On Tue, Jul 12, 2011 at 2:31 PM, Mike Meyer wrote:
> You write clearly enough that misinterpretation isn't likely. You were
> simply making false statements.
I do not do that, and I won't tolerate being called names and
badmouthed in public. This discussion is over.
--
Protege: What is this see
Nice, yes, that works just as well :)
On Tuesday, July 12, 2011 4:09:09 PM UTC-6, LaPingvino wrote:
>
> Didn't try, but shoudn't (def alist `(1 ~(fn [x y] (+ x y be better?
> Then you don't need the eval :)
>
> 2011/7/12 Benny Tsai
>
>> alist is missing parens around the fn, so it's really a
Didn't try, but shoudn't (def alist `(1 ~(fn [x y] (+ x y be better?
Then you don't need the eval :)
2011/7/12 Benny Tsai
> alist is missing parens around the fn, so it's really a list of 4 elements
> like so:
>
>
> (1, fn, [x y], (+ x y))
>
> So (second alist) returns just the symbol 'fn.
Hi Paul,
I posted an answer to your question in the "monads > macros" discussion.
--
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
alist is missing parens around the fn, so it's really a list of 4 elements
like so:
(1, fn, [x y], (+ x y))
So (second alist) returns just the symbol 'fn. And when you apply a Symbol
to a list, the result is the last item in the list (not sure why).
To do what you want, alist should be defi
Hi
I was wondering if anyone could shed some light on the
following code:
(def alist '(1 fn [x y](+ x y)))
(apply (second alist) '(1 3))
The result at REPL is 3 i.e. the second element of '(1 3).
Should the result not be 4 i.e. the result of applying the
arguments 1 and 3 to the anonymous fu
Hi
I was wondering if anyone could shed some light on the
following code:
(def alist '(1 fn [x y](+ x y)))
(apply (second alist) '(1 3))
The result at REPL is 3 i.e. the second element of '(1 3).
Should the result not be 4 i.e. the result of applying the
arguments 1 and 3 to the anonymous
On Jul 12, 12:01 pm, Konrad Hinsen wrote:
> The composability issue with macros lies in writing them, not using them.
Strongly disagree. Macros compose reasonably well when writing them
(eg, using let in the implementation of with-open is trivial); it's
composing already-written macros with other
On Jul 12, 9:28 am, James Keats wrote:
> I'm mildly concerned about macros being seen as the "secret weapon" of
> clojure(/lisp).
> In their place, i wish monads would get a wider attention and embrace.
>
> Discuss? :-)
What is your concern, specifically? I don't see a position being
articulate
Hey, thanks for recommending my library! :-)
Best,
Daniel
--
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 your
firs
On Mon, 11 Jul 2011 21:12:20 -0400
Ken Wesson wrote:
> On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer wrote:
> > On Mon, 11 Jul 2011 16:21:45 -0400
> > Ken Wesson wrote:
> >> > So, "repository" does not imply "server" at all,
> >> This is getting silly. "Repository" is a word that brings immediate
On 12 Jul 2011, at 15:40, James Keats wrote:
My humble understanding is that macros complicate composability,
whereas monads facilitate it.
The composability issue with macros lies in writing them, not using
them. Monads are all about composing computations with specific
properties, where
On Mon, 11 Jul 2011 20:49:01 -0400
Ken Wesson wrote:
> On Mon, Jul 11, 2011 at 7:39 PM, Mike Meyer wrote:
> > On Mon, 11 Jul 2011 07:51:33 -0400
> > Ken Wesson wrote:
> >
> >> On Sun, Jul 10, 2011 at 2:01 AM, mike.w.me...@gmail.com
> >> wrote:
> >> [snip most of post whose sole purpose seems
>> In their place, i wish monads would get a wider attention and embrace.
please y'all note that there's much more to
category-theory-in-programming-languages than just monads. :-)
http://www.haskell.org/haskellwiki/Typeclassopedia
sincerely.
--
You received this message because you are subscr
On Jul 12, 9:33 am, Thorsten Wilms wrote:
> It's not my perception that there is a lot of noise about macros,
> whereas articles about monads are like bunnies and have taken to the
> meta-level.
I was going to write an article about how to use monads to simplify
the implementation of the code for
On 07/12/2011 03:28 PM, James Keats wrote:
I'm mildly concerned about macros being seen as the "secret weapon" of
clojure(/lisp).
In their place, i wish monads would get a wider attention and embrace.
Do you want to suggest that it would be common that an issue can be
solved with either a ma
Check out the library clj-tagsoup: https://github.com/nathell/clj-tagsoup
David
On Tue, Jul 12, 2011 at 11:10 AM, Asim Jalis wrote:
> Is there a way to convert a large HTML document to a vector notation.
> So something that converts "Hello" to [:n1
> {:a1 = "v1"} [:n2 "Hello]].
>
> I am using
Is there a way to convert a large HTML document to a vector notation.
So something that converts "Hello" to [:n1
{:a1 = "v1"} [:n2 "Hello]].
I am using hiccup to generate HTML and need a way to convert existing
HTML templates to the hiccup format.
Thanks!
Asim
--
You received this message beca
On Jul 11, 2:12 pm, Max Weber wrote:
> Hi,
>
> I like to write some integration/acceptance tests in Clojure. At the moment
> I'm using cuke4duke (cucumber), but I'm not satisfied with it. For my unit
"When I’m done with the book I will pick up the work on a pure Java
implementation that will su
2011/7/12 David Nolen
> On Tue, Jul 12, 2011 at 9:40 AM, James Keats wrote:
>
>>
>>
>> On Jul 12, 2:36 pm, Tamreen Khan wrote:
>> > Are monads all that special? My understanding is that even in Haskell
>> > its wise to not use monads all that much, since it starts to make the
>> > code look a li
On Tue, Jul 12, 2011 at 9:40 AM, James Keats wrote:
>
>
> On Jul 12, 2:36 pm, Tamreen Khan wrote:
> > Are monads all that special? My understanding is that even in Haskell
> > its wise to not use monads all that much, since it starts to make the
> > code look a little too imperative if not wielde
Works great, Shantanu. Thanks!
On Tue, Jul 12, 2011 at 3:12 AM, Shantanu Kumar wrote:
> > It would be ideal if it could be run outside of the project structure, as
> > would be the case if an additional arity was added to the install
> function
> > in leiningen.install.
>
> Thanks for the report
On Jul 12, 2:36 pm, Tamreen Khan wrote:
> Are monads all that special? My understanding is that even in Haskell
> its wise to not use monads all that much, since it starts to make the
> code look a little too imperative if not wielded correctly. They're
> not really the meat of haskell/fp. Macro
Are monads all that special? My understanding is that even in Haskell
its wise to not use monads all that much, since it starts to make the
code look a little too imperative if not wielded correctly. They're
not really the meat of haskell/fp. Macros on the other hand are an
important part of lisp,
I'm mildly concerned about macros being seen as the "secret weapon" of
clojure(/lisp).
In their place, i wish monads would get a wider attention and embrace.
Discuss? :-)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
"Besides the languages itself, the "outsider" wants to evaluate libraries,
community, platforms, support, etc.
That could be much more challenging than comparing a few bare languages."
Absolutely! I asked a couple of times for recommendations, and was quite
surprised at the lack of forthcoming re
You know that from inside. A Clojure "outsider" can have a completely other
point of view.
He can choose between Python, server side Javascript, new C#, Go, Scala, F#,
Haskell, Erlang, haXe, Clojure.
Besides the languages itself, the "outsider" wants to evaluate libraries,
community, platforms, s
On Tue, Jul 12, 2011 at 8:20 AM, Adam Burry wrote:
> You've never seen a surgery up close.
>
> Many of the tools are wrapped in plastic and you need a helper to find
> them, open them, hand them to you, and clean them. You've got so many
> layers on you can't feel anything. The patient is moaning
That sounds more like Enterprise Java Development to me :)
On 12 July 2011 13:20, Adam Burry wrote:
> On Jul 12, 7:58 am, Colin Yates wrote:
> > FWIW, I like clojure.org the way it is. Without sounding like a
> complete
> > muppet, I think of Clojure as a set of surgeon's tools, all clean and
On Jul 12, 7:58 am, Colin Yates wrote:
> FWIW, I like clojure.org the way it is. Without sounding like a complete
> muppet, I think of Clojure as a set of surgeon's tools, all clean and layed
> out on a shiny metal tray. Minimalist, simple, clean and massively
> effective once you have thought a
Yeah! I downgraded to 1.5.2 and now it works.
Thanks a lot. Really nice.
--
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
Either this, or use the "when" form.
http://clojuredocs.org/clojure_core/clojure.core/when
2011/7/11 Tassilo Horn :
> Antonio Recio writes:
>
> Hi Antonio,
>
>> I get the error "Too many arguments to if" with this. Do you have any
>> suggestion?
>
> `if' expects exacly one test, one then-form, an
Thanks, that really works!
On Jul 12, 12:54 pm, Joost wrote:
> On Jul 12, 7:27 am, Tarantoga wrote:
>
> > Hi all,
> > I'd like to make a web-app to which I could connect using slime and
> > make some changes there while the application is still running. How to
> > start Swank-server from the wor
As I am the culprit of having introduced it with a naive example, I'd
better admit it may not be very useful in practical scenarios across a
wide variety of use cases. For example, when there is an assertion
error with message "`m` should be a map" 14 levels down the stack, I'd
really wish it said
"What other new shiny languages are there with any traction? Scala, and
maybe F#?"
"new" and "traction" are pretty subjective. Sometimes (as in my case) the
searcher just needs enough to sell themselves on the tool they have already
chosen, i.e. just enough facts to fit my theory.
FWIW, I like c
On Jul 12, 7:27 am, Tarantoga wrote:
> Hi all,
> I'd like to make a web-app to which I could connect using slime and
> make some changes there while the application is still running. How to
> start Swank-server from the working Ring-application?
The simplest way during development is to start swa
On Jul 12, 1:17 pm, finbeu wrote:
> Hi Shantanu,
>
> thanks a lot for that! Looks great. I just downloaded it, but now lein
> doesn't work anymore. It fails on windows using lein.bat.
It appears you are using Lein 1.6.0, which has a bug related to
RobertHook. Can you try downgrading to Lein 1.5
Hi Shantanu,
thanks a lot for that! Looks great. I just downloaded it, but now lein
doesn't work anymore. It fails on windows using lein.bat.
Even
lein new blabla
fails
If I remove the plugin, lein works again.
Brgds,
- Finn
C:\Documents and Settings\finn.beutel\My Documents\Clojure\lein>
On Tue, Jul 12, 2011 at 4:22 AM, Sergey Didenko
wrote:
>
>> Public relations -- Project status and activity. This area seems to
>> suggest the main Clojure page should be covered in tickers and feeds
>> of various kinds
>
> I think the main site needs just a pane with a big noticeable header "News
> Public relations -- Project status and activity. This area seems to
> suggest the main Clojure page should be covered in tickers and feeds
> of various kinds
>
I think the main site needs just a pane with a big noticeable header "News",
that shows one-two latest important stories and updates one
Hi,
Am Dienstag, 12. Juli 2011 03:12:20 UTC+2 schrieb Ken Wesson:
So, unless 4 can be made workable, ...
>
Did you try darcs?
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroup
On Tue, Jul 12, 2011 at 3:52 AM, Michael Wood wrote:
> Hi Ken
> On 12 July 2011 03:12, Ken Wesson wrote:
>> On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer wrote:
>>> I was with you until you said "stored remotely".
>>
>> Well, the source code is being worked on collaboratively by
>> geographically
Hi Ken
On 12 July 2011 03:12, Ken Wesson wrote:
> On Mon, Jul 11, 2011 at 7:51 PM, Mike Meyer wrote:
>> On Mon, 11 Jul 2011 16:21:45 -0400
>> Ken Wesson wrote:
>>> > So, "repository" does not imply "server" at all,
>>> This is getting silly. "Repository" is a word that brings immediately
>>> to
> It would be ideal if it could be run outside of the project structure, as
> would be the case if an additional arity was added to the install function
> in leiningen.install.
Thanks for the report -- I have pushed version 0.1.1 so it should now
be possible to install it as a plugin and run from
76 matches
Mail list logo