Hi,
If you really need multiple value calls, you can always try to emulate
parts of it with some fancy macros. I've hacked up a quick proof of
concept - I haven't gotten a chance to test it too much, but it seems
to work.
http://paste.lisp.org/display/68919
- Jeff
On Oct 20, 1:00 pm, "Fredrik
On Oct 20, 2:02 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> Hi Krukow,
>
> The quality will definitely be higher than this:
>
> http://blog.thinkrelevance.com/2008/9/16/pcl-clojure
>
> Same author, more time. :-)
>
> Stuart
Hi Stuart,
Sounds good - you have at least one buyer ;-) Will the
Germany here. I found Clojure just a few days ago and was quite happy
about that.
In fact, I felt euphoric from the beginning and still feel this way.
A cleaned up Lisp with a nice and talented dictator :-)
I like that it strongly asks for a functional programming style.
I am thinking about starti
I'm a total Clojure beginner, not to mention a C# guy with little Java
experience, but as I suspect I'm not alone I'll go ahead and ask
what's probably a dumb question. :)
I'm writing some simple code, and I've hit the point where having a
debugger would be helpful. Once I convinced clojure-swank
On 16 Okt., 22:01, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> #(identity %) is more compactly written as: identity.
>
> This works:
>
> user=> (apply max (filter identity '(1 2 nil 4)))
> 4
>
> In this case, number? is also a good predicate to use:
>
> user=> (apply
Duesseldorf & Hamburg, Germany
Cheers,
Dirk
--~--~-~--~~~---~--~~
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 from this group, send email t
On Oct 20, 1:31 pm, Liu Zehua <[EMAIL PROTECTED]> wrote:
> I am pretty new here.
>
> Guangdong, China.
> but now located in Singapore.
Also located in Singapore
--
-asbjxrn
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
Russian expat, currently in Hamilton, New Zealand
Alex
On Oct 21, 7:51 am, lpetit <[EMAIL PROTECTED]> wrote:
> Laurent PETIT, Bron (near Lyon), France
>
> On Oct 20, 7:03 pm, Luc Prefontaine <[EMAIL PROTECTED]>
> wrote:
>
> > Montreal prov. of Québec in Canada
>
> > Luc Préfontaine
>
--~--~-
On Mon, Oct 20, 2008 at 1:03 PM, Parth Malwankar
<[EMAIL PROTECTED]>wrote:
>
> On Oct 20, 3:51 pm, "Fredrik Appelberg" <[EMAIL PROTECTED]>
> wrote:
> > Hi all,
> >
> > The CL feature for handling multiple return values from a function come
> in
> > really handy sometimes and make for cleaner APIs.
On Oct 20, 7:03 am, Parth Malwankar <[EMAIL PROTECTED]> wrote:
> On Oct 20, 3:51 pm, "Fredrik Appelberg" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all,
>
> > The CL feature for handling multiple return values from a function come in
> > really handy sometimes and make for cleaner APIs. For example,
Laurent PETIT, Bron (near Lyon), France
On Oct 20, 7:03 pm, Luc Prefontaine <[EMAIL PROTECTED]>
wrote:
> Montreal prov. of Québec in Canada
>
> Luc Préfontaine
>
> On Fri, 2008-10-17 at 11:53 +0200, Mikael Hall wrote:
> > I'm from sweden.
>
> > Mikael Hall
>
> > 2008/10/17 Rastislav Kassak <[EMAI
> What are your concerns re: apply? Are there performance issues? Or is
> it not being able to call qsort on a collection directly?
I just want the code to look pretty, no deeper concerns than that. :-)
--~--~-~--~~~---~--~~
You received this message because you
Hi Stuart,
Am 20.10.2008 um 20:00 schrieb Stuart Halloway:
> Nice--I like this one, except for needing to apply. What I really want
> is arity overloading *within* the first argument, which is what led me
> down the path to multimethods.
Yes, sadly arity matching is only available at the top le
On Oct 20, 10:43 am, Stuart Halloway <[EMAIL PROTECTED]>
wrote:
> Hi Steve,
>
> Thanks! I like quicksort-4. It all fixes a problem that bugged me in
> all the other examples, which is that "bigger" is a lie. The real
> semantic is "not smaller", which quicksort-4 captures perfectly.
>
> I will
Hi Achim,
Nice--I like this one, except for needing to apply. What I really want
is arity overloading *within* the first argument, which is what led me
down the path to multimethods.
Is there a reason to prefer concat over lazy-cat here?
Cheers,
Stuart
> Hi!
>
> Here's a variadic version:
Hi Steve,
Thanks! I like quicksort-4. It all fixes a problem that bugged me in
all the other examples, which is that "bigger" is a lie. The real
semantic is "not smaller", which quicksort-4 captures perfectly.
I will have to get used to thinking of "remove" as the opposite of
"filter." The
Montreal prov. of Québec in Canada
Luc Préfontaine
On Fri, 2008-10-17 at 11:53 +0200, Mikael Hall wrote:
> I'm from sweden.
>
> Mikael Hall
>
>
> 2008/10/17 Rastislav Kassak <[EMAIL PROTECTED]>
>
>
> Hello Clojurians,
>
> I think after 1st year of Clojure lif
> get-in is probably what you are looking for.
and
> No. It does not ignore the extra parameter! This is a default value,
> which is returned in case the index is not contained in the vector.
Ah, cool. I was going to blame the cold medicine I was on at the time
for my inability to find this inf
I'm still learning Clojure myself, but I've had some good luck using
Rich's Ant Colony demo source as a basis for a simple game I am
making. I'm not sure how well it follows what might become "best
practices" for clojure game programming, but it has helped me overcome
some of the initial hurdles
Hi!
Here's a variadic version:
(defn qsort
([] [])
([x & xs] (concat (apply qsort (filter #(< % x) xs))
(cons x (apply qsort (filter #(>= % x) xs))
user> (qsort 1234 56 789 0)
(0 56 789 1234)
Kind regards,
achim
Am 2
On Oct 20, 2008, at 11:16 AM, Stuart Halloway wrote:
> Hi all,
>
> I seem to recall Rich saying "I like the destructuring part of pattern
> matching." In my efforts to appreciate that statement, I am playing
> around with porting simple Haskell examples to Clojure, trying to use
> destructuring (
Hanoi, Vietnam
On Fri, Oct 17, 2008 at 4:27 PM, Rastislav Kassak <[EMAIL PROTECTED]> wrote:
>
> Hello Clojurians,
>
> I think after 1st year of Clojure life it's good to check how far has
> Clojure spread all over the world.
>
> So wherever are you come from, be proud and say it.
>
> I'm from Slo
Hi all,
I seem to recall Rich saying "I like the destructuring part of pattern
matching." In my efforts to appreciate that statement, I am playing
around with porting simple Haskell examples to Clojure, trying to use
destructuring (and multimethods) where the Haskell does pattern matches.
I am pretty new here.
Guangdong, China.
but now located in Singapore.
On Oct 18, 6:53 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hubei,China
>
> gerry
>
> On Oct 17, 5:27 pm, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote:
>
> > Hello Clojurians,
>
> > I think after 1st year of Clojure l
Strasbourg, France
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For m
On Oct 20, 10:12 am, Alex Miller <[EMAIL PROTECTED]> wrote:
> Sorry, I was not thinking straight when I wrote part of this. We will
> protect you from seeing nulls by faulting values back in, even if not
> read under a lock. So, what you said originally there is true. There
> is a possibility
Sorry, I was not thinking straight when I wrote part of this. We will
protect you from seeing nulls by faulting values back in, even if not
read under a lock. So, what you said originally there is true. There
is a possibility that you can get dirty reads in this scenario but in
the case of an i
> Direct or indirect contributions to clojure.contrib require that the
> contributed code be written by the contributor and that the
> contributor have a contributor agreement on file with Rich.
Just put mine in the mail :)
--~--~-~--~~~---~--~~
You received this
Hi Krukow,
The quality will definitely be higher than this:
http://blog.thinkrelevance.com/2008/9/16/pcl-clojure
Same author, more time. :-)
Stuart
> On Oct 20, 12:30 am, Paul Barry <[EMAIL PROTECTED]> wrote:
>> Krukow,
>>
>> I agree, it would help to have a resource for learning Clojure. Fo
California, USA
--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more
On Oct 20, 3:51 pm, "Fredrik Appelberg" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> The CL feature for handling multiple return values from a function come in
> really handy sometimes and make for cleaner APIs. For example, the ROUND
> function returns the integer part of a float as the regular val
Hi all,
The CL feature for handling multiple return values from a function come in
really handy sometimes and make for cleaner APIs. For example, the ROUND
function returns the integer part of a float as the regular value (as this
is what you want most of the time), but optionally also returns the
Thanks for the updates!
Alexander
2008/10/18 Rich Hickey <[EMAIL PROTECTED]>
>
>
>
> On Oct 18, 11:42 am, Alexander Kjeldaas <[EMAIL PROTECTED]>
> wrote:
> > The following fails for me:
> >
> > (load-string
> >(format "(quote (%s))"
> >(nth (iterate #(format "%s%s" % %) "(1 2 3 4)") 1
On Oct 20, 6:16 am, "Tom Emerson" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a somewhat embarassing newbie question on the use of hash maps
> in a functional environment.
>
> Consider a little utility that counts the number of unique words in a
> file. A hash map mapping strings to integers
On Oct 20, 1:38 am, Adam Jones <[EMAIL PROTECTED]> wrote:
> I'm starting up work again on my Clojure-based game. Up until this
> point I've been doing things the "dirty" way by re-defing a bunch of
> global variables and/or storing the values in the Java objects I need
> to use to get access to
Hi all,
Adding the below to your .emacs will make slime change packages
correctly according to (in-ns 'foo).
All I did was alter slime-search-buffer-package in slime.el to create
slime-search-buffer-package-clojure. The standard common-lisp
patterns are still valid.
Something like this could g
After some hacking and a little help from #clojure, here is my initial
gift to the community:
Add the following function definition to
swank-clojure/swank/commands/basic/basic.clj to get C-j working in
*slime-scratch*.
(in-ns 'swank.commands.basic) ;; optional, only if you have the below
functio
37 matches
Mail list logo