Hi all,
I'm trying to come up with a way to create a 'tournament' fn that
basically alternates between players (in turns) and calls soem 'move' fn
on each. Now, obviously this can be done with loop/recur no problem,
however perhaps a combination of cycle iterate is more
appropriate...so
Hi again,
It turns out that reduce is exactly what I need...I didn't know this but
there is a handy 'reduced' fn that makes it easy to terminate from
within a reduce at any given time. At least this is what i understand
from the docs...so the final thing looks like this:
(defn tournament
On Fri, Sep 14, 2012 at 7:53 PM, Frank Siebenlist
frank.siebenl...@gmail.com wrote:
We're happy to announce the new clj-ns-browser 1.3.0 - the cool
button-row widget - release.
The Clojure Namespace Browser is a GUI-based, Smalltalk-like development
tool that makes it easy to see, inspect,
On Sun, Sep 16, 2012 at 5:15 AM, Jim - FooBar(); jimpil1...@gmail.comwrote:
It turns out that reduce is exactly what I need...I didn't know this but
there is a handy 'reduced' fn that makes it easy to terminate from within a
reduce at any given time. At least this is what i understand from the
exactly!!! this is great stuff indeed! I spent all morning trying to
find more info than the actual docstring but I can't find anything! It
seems to work as advertised though...very handy but it only works with
1.5 :-)
(reduce #(if (= 3 %2) (reduced %) (conj % %2)) [] (range 5))
=[0 1 2]
After the bug fix on ubuntu:
denis@zeus:~/.m2$ time drip -cp
./repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar clojure.main -e
(reduce + (range 100))
4950
real0m0.123s
user0m0.032s
sys 0m0.016s
denis@zeus:~/.m2$ time java -cp
Denis Labaye:
After the bug fix on ubuntu:
denis@zeus:~/.m2$ time drip -cp
./repository/org/clojure/clojure/1.4.0/clojure-1.4.0.jar clojure.main -e
(reduce + (range 100))
4950
real0m0.123s
user0m0.032s
sys 0m0.016s
denis@zeus:~/.m2$ time java -cp
Hello. I'm new here, so, not sure if those were already posted. But why is
this not used? An example would be:
#(%a %%b %%%c) would be the same as (fn [a] (fn [b] (fn [c] (a b c)))
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group,
Hi, I'm trying to use multi-methods, with the implementations broken over a
few namespaces, but am a little confused as to the best way to structure
this. At the moment i have this in two namespaces/files...
(ns jiff.vcs)
(defmulti jiff-seq :vcs)
(ns jiff.svn (:use jiff.vcs))
;; svn impl...
Hi Everyone,
Trying to setup emacs 24.2 on mac osx clean setup, nothing else.
clojure-mode 20120808 installed Major mode for Clojure code
[source: github]
nrepl 20120912.248 installed Client for Clojure nREPL [source:
github]
nrepl-ritz 20120913 installed nrepl
Hi guys.
In this code
http://pastebin.com/tJNhabJw
When the second case is executed the output is:
The output is (Juice
Sandwich
nil Banana
nil nil)
Where these nil come from ?
Thanks
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
Hi Mimmo,
I don't really have an answer to this, but I share your interest in the
question.
The only thing I can suggest is taking a look at
Jayqhttps://github.com/ibdknox/jayq.
It's a ClojureScript wrapper around jQuery. It wrapping a large complex
existing JavaScript API, successfully, so
Hi guys,
Maybe the subject does not give a got clue about my question, so here's a
snippet of code:
http://pastebin.com/tJNhabJw
Could you please help me to understand why in the second case the output
is (Juice Sandwich nil Banana nil nil) ? Where these nil came from ?
Thank you!
--
Greetings Jim
Can you please elaborate more on this line ... maybe give examples
On Wednesday, September 12, 2012 3:45:56 AM UTC+2, Jim Crossley wrote:
...
For certain applications, I would recommend using libraries to access
external processes like Memcached, RabbitMQ, or cron, for
On Thu, Sep 13, 2012 at 12:56:47PM -0400, Chas Emerick wrote:
One of the great advantages of Ring (and other purely functional bits
that stack on top, like Compojure, Bishop, etc) is that its handlers
are readily composable. Among other things, this means that way you
compose handlers from
I've used it in conjunction with goog/base due to a problem with
simple/advanced compilation. I'm not sure if things have changed since I
encountered this problem, or if there is something else I'm doing wrong.
See the code and comment below. The deactivated this-as code only worked
with
On Sun, Sep 16, 2012 at 8:59 PM, Michael Klishin
michael.s.klis...@gmail.com wrote:
Denis Labaye:
After the bug fix on ubuntu:
denis@zeus:~/.m2$ time drip -cp ./repository/org/clojure/**
clojure/1.4.0/clojure-1.4.0.**jar clojure.main -e (reduce + (range
100))
4950
real0m0.123s
println is a function that has the side effect of printing a string to the
output, but it also has a return value of nil.
When working at the REPL, these can sometimes be mingled together due to the
order of evaluation.
If you want to do something like 'for' but only for the purposes of side
Leiningen works under Windows (as lein.bat). I'm not sure if it works under
Cygwin.
I've encountered problems in the past with Cygwin because the Java
executable is the Windows version, using Windows path-separator characters,
but scripts expect Unix-style path separators.
Try downloading
...Just trying to understand the rationale between Clojure's design here.
As I gradually get deeper into Clojure, I've been highly impressed by how
well thought-out everything is, so I'm sure there is a very good reason for
this one too. The question is:
Why are Clojure's built-in collections
Hi,
I'm a newbie at clojure and functional programming and I'm toying with the
idea of switching a project of mine to clojure. Sorry for a long first
post, and it may also be a bit abstract - but you never know before trying
:)
In my previous OO prototype the domain is modelled via 2 basic
Would it be correct to interpret this as another vote for JVM Clojure's
proxy macro?
On Wednesday, September 12, 2012 7:16:37 PM UTC-7, Alexander Hudek wrote:
I've used it in conjunction with goog/base due to a problem with
simple/advanced compilation. I'm not sure if things have changed
Background: I'm developing a web based development environment.
Problem: Is there a way to evaluate clojurescript code from clojure? I need
to call clojurescript code like (load-file foo.cljs) from clojure. Note
this is different then starting a clojurescript repl and typing in
(load-file
From your description of how proxy would work, yes.
On Sunday, September 16, 2012 6:48:44 PM UTC-4, Brandon Bloom wrote:
Would it be correct to interpret this as another vote for JVM Clojure's
proxy macro?
On Wednesday, September 12, 2012 7:16:37 PM UTC-7, Alexander Hudek wrote:
I've used
Hi Folks,
I'm still new to clojurescript, but I thought I would share with you some of
the annoyances that person
person coming from JS (like myself) will likely run into:
http://jeditoolkit.com/2012/09/16/coljurescript-feedback.html
Regards
--
Irakli Gozalishvili
Web:
Mostly efficiency. A Seq generally gives you access to `first` and `rest`
in constant time. Vectors, to take one example, cannot give you `rest`
efficiently, but a Seq backed by the vector can.
Clojure lists are implemented as singly-linked lists, which do have
first/rest pointers, so they
Hi,
I'm trying to write a small parser using DCG, but when I use the code
below
-- parser.clj ---
(ns compiler.parser
(:refer-clojure :exclude [==])
(:use [clojure.core.logic]
[clojure.core.logic.dcg] )
)
(def--e token [tg x]
([_ ?tk] [?tk]
27 matches
Mail list logo