I'm working on a project in which it would be very useful to be able
to easily determine how many characters were consumed in the course of
a read operation, in a similar fashion to the way that Common Lisp's
read-from-string returns as a second value the index of the next
character of the input pa
No, constructor functions are the correct way to accomplish this.
-S
On Aug 27, 5:16 pm, Darren Austin wrote:
> Hi folks,
>
> Is there a way to specify default values for the fields of a
> defrecord? Or barring that, is there a way to override or augment the
> constructor for the record?
>
> Tha
On Fri, Aug 27, 2010 at 8:06 PM, wrote:
> I got it working with the our-classe-only plug-in.
> I tested it on my brain damaged project and it kept only the class files
> for which a name space exists in the source folder. The target is now
> cleaned up of any external class dependencies.
>
> Now,
On Aug 27, 3:42 pm, B Smith-Mannschott wrote:
> This thread got me thinking that when a namespace is partially promoted to
> Clojure proper, it might be good to provide a reduced version of the old
> namespace, providing just the functionality that was not promoted as an
> alternative to complete
With the 1.2.0 release, there was an effort to get the most useful
parts of contrib -- IO and string handling, in particular -- into
Clojure proper, with the goal of making contrib unnecessary for
everyday programming.
Hopefully, contrib can go back to being what it was meant to be: an
experimenta
Hi Phil,
I got it working with the our-classe-only plug-in.
I tested it on my brain damaged project and it kept only the class files
for which a name space exists in the source folder. The target is now
cleaned up of any external class dependencies.
Now, if others need this what do you suggest ?
Please, let me know if you're still having trouble using native-deps with
lein 1.3.0 in your projects.
David
--
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 member
On Fri, Aug 27, 2010 at 2:06 PM, Mike Meyer
wrote:
> (doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
> nil
Based on the docs, I was confused by that because I expected a hash
map (with keys a and b). When I ran it locally, I got:
#
which was what I expected.
--
Sean A Corfield -- (90
I think the root of the misunderstanding is this: doto is NOT -> or -
>>
doto is typically used for initializing mutable java objects. So,
instead of (let [foo ...] (.bar foo) (.baz foo) foo) , you can use
(doto ... .bar .baz) It looks like you're trying to return the value
of the last expressio
Hi folks,
Is there a way to specify default values for the fields of a
defrecord? Or barring that, is there a way to override or augment the
constructor for the record?
That is, if I have:
(defrecord Foo [a b c d e f g])
I want to be able to create a new Foo with:
(Foo.)
and have default val
On Fri, 27 Aug 2010 13:39:34 -0700 (PDT)
cej38 wrote:
> I don't understand doto.
Apparently. The doc says:
user> (doc doto)
-
clojure.core/doto
([x & forms])
Macro
Evaluates x then calls all of the methods and functions with the
value of x supplied at the from of the
I don't understand doto.
Suppose I try the following:
user=> (doto 1 println)
1
1
user=>
Now suppose I try the following:
user=> (doto 1 #(println (inc %)))
1
user=>
But if I make the following definition:
(defn some-function [x]
(println (inc x)))
user=> (doto 1 some-function)
2
1
user=>
This thread got me thinking that when a namespace is partially promoted to
Clojure proper, it might be good to provide a reduced version of the old
namespace, providing just the functionality that was not promoted as an
alternative to complete removal.
Anyway, I've sketched out the idea as a patch
A lunch club sounded like a great idea, so I'm organizing one for
Monday the 30th in the Philadelphia suburbs - I've also created a
google group for coordination. If anyone's able to make it, please
drop an email to the list so I know how many to expect.
http://groups.google.com/group/phl-clojure-
On Fri, Aug 27, 2010 at 8:17 AM, Btsai wrote:
> How are you grabbing the sources? I'm also running under Windows, and
> get the source from github via msysgit, which handles the crlf vs. cr
> issue nicely.
>
same here. that only handles the source crlf I assume. What I did was
specifically for th
Mark,
Can JavaFX do that?
Regards,
Emeka
On Mon, Aug 23, 2010 at 7:12 PM, Mark Engelberg wrote:
> > Rather than
> > creating the JavaFX language they would have done so much more for the
> > community to just focus on this scenegraph library, animation, etc...
>
> I agree. I'm not interested i
On Fri, 27 Aug 2010 04:09:31 -0700 (PDT)
frou wrote:
> Is it or would it be possible to add some basic text colouring to the
> standard REPL (the one started with the "clj" shell script).
>
> It would be nice to be able to make the prompt, e.g. "user=>" coloured
> (green in my case) so that you
Excellent. Thank you both.
On Aug 27, 3:13 pm, Chouser wrote:
> On Fri, Aug 27, 2010 at 9:48 AM, Ramakrishnan Muthukrishnan
>
> wrote:
> > On Fri, Aug 27, 2010 at 4:39 PM, frou wrote:
> >> Is it or would it be possible to add some basic text colouring to the
> >> standard REPL (the one started
I'll try it today and let you know by the end of today if I can
manage it :)
Luc P.
Phil Hagelberg wrote ..
> On Thu, Aug 26, 2010 at 5:59 PM, wrote:
> > Instead I decided to experiment a Leiningen plug in, sauberjar to create the
> > target only with the class files and only the ones for whic
How are you grabbing the sources? I'm also running under Windows, and
get the source from github via msysgit, which handles the crlf vs. cr
issue nicely.
On Aug 27, 8:07 am, gary ng wrote:
>
> I need to exclude/modify a few test when running under windows, due to
> the crlf vs cr stuff
--
You
Hi Timothy,
All Clojure code compiles to Java bytecode. You can do this on-the-fly at
runtime, and this is fast enough to be a reasonable option. Or, you can
AOT-compile (see http://clojure.org/compilation).
Clojure has a lot of granular abstraction under the hood. (Said another way:
Clojure o
On Fri, Aug 27, 2010 at 9:48 AM, Ramakrishnan Muthukrishnan
wrote:
> On Fri, Aug 27, 2010 at 4:39 PM, frou wrote:
>> Is it or would it be possible to add some basic text colouring to the
>> standard REPL (the one started with the "clj" shell script).
>>
>> It would be nice to be able to make the
On Fri, Aug 27, 2010 at 7:02 AM, B Smith-Mannschott
wrote:
> What test failures are you seeing? I'm not seeing any building
> github.com/clojure/clojure-contrib 1.2.0-RC3
> (e4ea06c9ff93df3b3f667ab5768618ece5a98b6e).
> Ran 365 tests containing 1298 assertions.
> 0 failures, 0 errors.
I need to exc
What test failures are you seeing? I'm not seeing any building
github.com/clojure/clojure-contrib 1.2.0-RC3
(e4ea06c9ff93df3b3f667ab5768618ece5a98b6e).
Ran 365 tests containing 1298 assertions.
0 failures, 0 errors.
[INFO]
[I
On Fri, Aug 27, 2010 at 4:39 PM, frou wrote:
> Is it or would it be possible to add some basic text colouring to the
> standard REPL (the one started with the "clj" shell script).
>
> It would be nice to be able to make the prompt, e.g. "user=>" coloured
> (green in my case) so that you get at-a-g
On Fri, Aug 27, 2010 at 3:25 AM, santervo wrote:
> I get sometimes ArrayIndexOutOfBounds in repl when creating a nested
> map, using exactly same syntax (clojure 1.2):
>
> user=> { :a { :b "C" } }
> {:a {:b "C"}}
> user=> { :a { :b "C" } }
Running 1.2.0 and I'm not seeing this. This only happen
I get sometimes ArrayIndexOutOfBounds in repl when creating a nested
map, using exactly same syntax (clojure 1.2):
user=> { :a { :b "C" } }
{:a {:b "C"}}
user=> { :a { :b "C" } }
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.
Is it or would it be possible to add some basic text colouring to the
standard REPL (the one started with the "clj" shell script).
It would be nice to be able to make the prompt, e.g. "user=>" coloured
(green in my case) so that you get at-a-glance distinction between
your inputs and the results p
I ended up using pmap; I found that on a 2-core machine, it led to
about a 1.6 time speedup; on an 8-core, it led to a 3 time speedup,
which I found somewhat surprising; maybe all the cores are not being
utilized.
--
You received this message because you are subscribed to the Google
Groups "Cloju
Greetings,
While reading up on Clojure's to Java interfacing, I thought it might
be helpful to see how the clojure code appears to the JVM. Does
clojure compile the source directly to JVM bytecode? If not, is there
a way we can get the Java output for a given clojure source file?
Specifically, I'm
Agree with Daniel Janus. There are some conflicts without any reason.
This should be cleaned up for 1.2.1 version.
More over when I build clojure-contrib-1.2.jar I get 4 failures on
tests due to. It shouldn't appear in a final versions.
All contributors and Rick do a great job but you should think
On Fri, Aug 27, 2010 at 13:54, Daniel Janus wrote:
> Hi,
>
> so I finally got around to port my app to Clojure 1.2 and got confused
> about the contrib shuffles.
>
> There's clojure.java.io and clojure.contrib.io. The docs on the latter
> says that most of the functions defined in there are depre
Hi,
so I finally got around to port my app to Clojure 1.2 and got confused
about the contrib shuffles.
There's clojure.java.io and clojure.contrib.io. The docs on the latter
says that most of the functions defined in there are deprecated, and
one should use clojure.java.io instead. But clojure.ja
33 matches
Mail list logo