I'm really excited about clojure, and would like to study it with like
minded individuals. Any takers? I can probably find a place to meet.
Thanks,
~Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure
Jason,
Check out:
http://www.meetup.com/The-Bay-Area-Clojure-User-Group/calendar/9719627/?a=ce1p_grp
The next meeting is March 12th.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this
When working on a list, both cons and conj add to the front. In my
tests, cons is considerably faster than conj. I'm trying to figure out
why.
Here's the implementation of conj.
(def
#^{:arglists '([coll x] [coll x xs])
:doc conj[oin]. Returns a new collection with the xs
'added'.
On Fri, Mar 6, 2009 at 7:55 AM, Mark Volkmann r.mark.volkm...@gmail.com wrote:
When working on a list, both cons and conj add to the front. In my
tests, cons is considerably faster than conj. I'm trying to figure out
why.
In my testing they are the same speed.
Here's the implementation of
Currently, user.clj is loaded automatically during Clojure boot (in RT
static init). I think this is done as a convenience for repl usage,
since other apps could easily include a 'load' 'require' or 'use' of
whatever is needed. I am proposing that auto-loading of user.clj be
removed. A command
Is it fair to say that Clojure shines in algorithmic processing, string
processing, concurrency management, but that there are better choices in
other areas:
- Application programming , where the key challenge is fitting a standard
three-tier application to the business domain.
- Enterprise
On Fri, Mar 6, 2009 at 7:00 AM, Chouser chou...@gmail.com wrote:
On Fri, Mar 6, 2009 at 7:55 AM, Mark Volkmann r.mark.volkm...@gmail.com
wrote:
When working on a list, both cons and conj add to the front. In my
tests, cons is considerably faster than conj. I'm trying to figure out
why.
On Mar 5, 2009, at 19:21, Konrad Hinsen wrote:
For those who are interested in monads but don't want to learn
Haskell first to understand the Haskell-based monad tutorials, I have
started to write a Clojure monad tutorial. Part 1 is now available:
Part 2 is now published as well:
How about removing it from the RT static init and into the REPL function?
Paul
On 3/6/09, MikeM michael.messini...@invista.com wrote:
Currently, user.clj is loaded automatically during Clojure boot (in RT
static init). I think this is done as a convenience for repl usage,
since other
How about removing it from the RT static init and into the REPL function?
I think that would work and it would be transparent for repl users. A
command line option to not load user.clj might be nice to have in this
case.
--~--~-~--~~~---~--~~
You received this
On Mar 6, 12:19 am, Mark Engelberg mark.engelb...@gmail.com wrote:
I know that this has been brought up several times here, but I don't
recall whether there was ever any resolution:
It seems reasonable to expect (compare '(1 2 3) '(4 5)) to do a
lexicographic comparison of the two lists,
Hi,
Having attend Stu Halloway's talk on Clojure, at NFJS, I decided to
download it and check it out. The language seems like a perfect fit
for some database set manipulation that I do, and may need to do in
the future.
So, I downloaded clojure and started it up with the command:
java -cp
I thought it neat that clojure supports fractions (just like
Smalltalk).
user= (/ 3)
1/3
I was sort of surprised by this.
user= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) )
0.3334
(= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) ) (/ 3) )
yields true
How is tracking these
Hi Mr Volkmann,
Here are my result:
user= (println \nconj list)
conj list
nil
user= ; Adds to front.
user= (build-coll '() (fn [coll i] (conj coll i)) size)
Elapsed time: 28.09443 msecs
nil
user=
user= (println \ncons list)
cons list
nil
user= ; Adds to front.
user= (build-coll '() (fn [coll
On Mar 6, 8:15 am, Joshua Fox joshuat...@gmail.com wrote:
Is it fair to say that Clojure shines in algorithmic processing, string
processing, concurrency management, but that there are better choices in
other areas:
- Application programming , where the key challenge is fitting a standard
I would like to have a function which tells me about the values of a
var, where the parameter to the function is a string equal to the
'name' of the var.
For example:
(defn checkNil [name]
If the var with the given (String) name is nil, display a
message; result = value of var.
(when
On Mar 6, 2009, at 8:08 AM, MikeM wrote:
I know I can avoid the problem by either not having a user.clj, or not
having defmethods in user.clj, but it seems more straightforward to
have a command-line option rather than have such restrictions.
Every launch of Clojure has the opportunity to
On Fri, Mar 6, 2009 at 12:24 AM, mike.farn...@gmail.com
mike.farn...@gmail.com wrote:
Hi,
Having attend Stu Halloway's talk on Clojure, at NFJS, I decided to
download it and check it out. The language seems like a perfect fit
for some database set manipulation that I do, and may need to do
On Fri, Mar 6, 2009 at 12:24 AM, mike.farn...@gmail.com
mike.farn...@gmail.com wrote:
So, I downloaded clojure and started it up with the command:
java -cp clojure.jar clojure.lang.Repl
The docs indicate: This will bring up a simple read-eval-print loop
(REPL).
Is this truly an infinite
On Thu, Mar 5, 2009 at 11:24 PM, mike.farn...@gmail.com
mike.farn...@gmail.com wrote:
Hi,
Having attend Stu Halloway's talk on Clojure, at NFJS, I decided to
download it and check it out. The language seems like a perfect fit
for some database set manipulation that I do, and may need to do
Hi!
I tried this: (var (symbol name))
but that caused the exception: clojure.lang.PersistentList cannot be
cast to clojure.lang.Symbol
var is a special form. If var was a function, (symbol name) would have
been evaluated and the result would have been passed to var as an
argument.
On Fri, Mar 6, 2009 at 9:27 AM, Paul Stadig p...@stadig.name wrote:
On Fri, Mar 6, 2009 at 12:24 AM, mike.farn...@gmail.com
I tried a number of commands to exit.
So, I just hit ctrl-C. (This is on Windows).
I had the same question in getting started. Someone told me to type
(System/exit
On Mar 6, 2009, at 9:44 AM, Mark Volkmann wrote:
ctrl-c is the right way to exit under Windows.
Under UNIX, Linux and Mac OS X, I think ctrl-d is preferred.
I agree.
Here's some more info:
On the Unixes, ctl-d represents end-of-file (end of input stream).
Usually terminals and
Application programming is exactly what we do with Clojure,
we are not using it in a bubble, it's there to implement all
the complex logic we need.
We use over 130 jars (Spring,...) and we use them from both Clojure and
some Java components. We are replacing with Clojure code
the Java high
As my Clojure application is now getting quite complex, I was curious
as to what workflow people are using for design, development,
testing and debugging.
I'll get started with what I've found, so far, though I am definitely
open to suggestion. There are a few parts I'm not quite satisfied
with.
Hi,
in the API specs on http://clojure.org/api#toc247 I see the function
frest.
However, when I build Clojure (Checked out revision 1326 from
Googlecode) this function seems to be missing.
Any idea?
Regards,
Arie
--~--~-~--~~~---~--~~
You received this message
My dream debugger would be to pause execution on a certain line, be
able to step through function calls, and have a REPL with all local
vars available so I could explore the problem. But I'm pretty sure
that doesn't exist.
My dream debugger would be this:
http://www.lambdacs.com/debugger/
The biggest barrier to using Clojure in an enterprise environment is
that enterprise projects are typically built and maintained by 100s of
replaceable code-monkeys and consultants, all of which understand Java
and almost none of which understand Lisp of any kind, let alone
Clojure.
To be
On Fri, Mar 6, 2009 at 10:42 AM, hotcore xapw...@gmail.com wrote:
in the API specs on http://clojure.org/api#toc247 I see the function
frest.
However, when I build Clojure (Checked out revision 1326 from
Googlecode) this function seems to be missing.
The website generally documents the
Which raises the question when will there be another release? The current
one is getting pretty wildly outdated. Also, I think a corresponding
release of contrib would be a good idea.
People just trying out Clojure are unlikely to want to mess with the
nightly builds, but all the libraries are
I agree about consultants (these days it's not anymore an synonym for
expert) and the state of the market but...
If you write a new software product and
you are concerned with deadlines and speed in general, Java is not
the way to go anymore considering the pile of code you need to do
anything
If these theories are correct (and I believe they are) then this is
an opportunity to beat the crap out these guys in head-to-head competition.
The Rails guys seem to have successfully broken into industry by being
better (relatively compared to Java/VB/C#). We can do the same thing if we
don't
On Mar 6, 7:46 am, Luke VanderHart luke.vanderh...@gmail.com wrote:
The biggest barrier to using Clojure in an enterprise environment is
that enterprise projects are typically built and maintained by 100s of
replaceable code-monkeys and consultants, all of which understand Java
and almost
If it works with Java, then it should be possible to get it working
with Clojure, no? It may take some work, but should be possible.
I have to say, my experience with JSwat was adequate. Obviously a
debugger that could step back would be better, but with JSwat I was
able to step between Java
On Mar 5, 10:00 pm, mike.farn...@gmail.com mike.farn...@gmail.com
wrote:
I was sort of surprised by this.
user= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) )
0.3334
(= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) ) (/ 3) )
yields true
How is tracking these number
On Mar 6, 2009, at 14:15, Joshua Fox wrote:
Is it fair to say that Clojure shines in algorithmic processing,
string processing, concurrency management, but that there are
better choices in other areas:
I'd say that Clojure is probably suited for anything that the JVM is
suited for. Its
Oh, I agree with you 100%.
I outlined why I wouldn't use Clojure in a project self-described as
enterprise, but at risk of ranting I didn't get into how I consider
the word enterprise synonymous with bloated, bureaucracy-bound,
over-engineered, unoriginal and above all /expensive/ ball of tar.
My wife and I both write software. She think's I'm insane to use
Clojure because the poor sucker who has to maintain what I've written
will be uncomfortable with anything other than Java. (She may also
think the poor sucker won't want to deal with my dubious programming
skills, but that's
Hi,
which means that frest is in fact obsolete and fnext is it's successor?
Tia,
Arie
2009/3/6 Chouser chou...@gmail.com
On Fri, Mar 6, 2009 at 10:42 AM, hotcore xapw...@gmail.com wrote:
in the API specs on http://clojure.org/api#toc247 I see the function
frest.
However, when I
Usually if has mustaches, 4 legs, oval shaped eyes, fur and
makes p ! prrr ! when I touch it, I call it a cat :)))
Most of my customers are accustomed to my crude language.
Since they have results when they deal with me compared to what
they get internally and from other suppliers, they
What's the status of this JSR? Is it possible the JDK 7 will include
more palatable date processing capabilities? I think it would be a shame
if external libraries were required to get sane date processing in
Clojure, but if the JDK 7 has potential to fix it, that's encouraging.
As far as
On Fri, Mar 6, 2009 at 11:18 AM, Paul Stadig p...@stadig.name wrote:
If it works with Java, then it should be possible to get it working
with Clojure, no? It may take some work, but should be possible.
It wouldn't be terribly appropriate. The ODB is meant to deal with
mutability in Java code
Konrad Hinsen konrad.hin...@laposte.net writes:
As for what JVM languages are not good for in general, there is the
obvious domain of systems-level programming, and there are other
domains such as number crunching, where there is a severe lack of
good libraries in the Java world.
The
Hi guys, anyone has an insight into the problem I'm running into?
On Mar 4, 2:27 am, Dimiter \malkia\ Stanev mal...@gmail.com
wrote:
Hi guys,
In the example below, if map is replaced with pmap, it goes twice
slower on my MBP (2 CPUs).
I believe it's probably the (reduce + ...) causing it,
Hi,
Am 06.03.2009 um 19:21 schrieb Phil Hagelberg:
The only other thing I can think of is short-lived command-line tools
that need subsecond launch times.
Even this can be addressed via Nailgun as I use
it now for dynamic VimClojure (aka Gorilla). A
server runs in the background and invoking
Clojure is not good for:
- Real time application development, due to the JVM being soft-real
time. For example it can't be used for high-performance video pc/
console games, but it could be used for lots of turn-based games. Then
again anything done with XNA on the XBOX could be done with
levand luke.vanderh...@gmail.com writes:
I use Emacs+Slime in windows (I'd prefer a Mac if I could afford one)
as my primary development environment. I start Emacs with a project-
specific batch file that adds all the libraries I use to the CLASSPATH
environment variable and then invokes
It is pretty common to get a slowdown when moving from map to pmap. It just
means that the thread scheduling overhead is greater than the gain from
parallelizing the code. The behavior might be very different w/ larger data
sets, or w/ more CPU's. It is often best to leave parallelism as an
Allen Rohner aroh...@gmail.com writes:
As far as I can tell, the JSR was approved to go into Java 7, but
there is some risk of them not being done by the deadline. JSR-310 is
a complete re-write, I assume for licensing reasons.
Interesting.
One of the large advantages of Joda is that the
On Fri, Mar 6, 2009 at 7:24 AM, mike.farn...@gmail.com
mike.farn...@gmail.com wrote:
Hi,
Having attend Stu Halloway's talk on Clojure, at NFJS, I decided to
download it and check it out. The language seems like a perfect fit
for some database set manipulation that I do, and may need to do
In my experience, debuggers are good for two things: investigating bugs
in your infrastructure (in Clojure or other dependencies) and
investigating performance problems. If you are feeling the need to step
into a debugger to deal with correctness problems, it's merely a sign
that your test
- Writing small utility programs, as it requires certain things to
be installed properly (For example using java -serever with the
correct JVM). For example I can't see myself deploying small utility
application at work written with Clojure, as it would make people
screaming, why they
On Fri, Mar 6, 2009 at 5:00 PM, Stephen C. Gilardi squee...@mac.com wrote:
On Mar 6, 2009, at 9:44 AM, Mark Volkmann wrote:
ctrl-c is the right way to exit under Windows.
Under UNIX, Linux and Mac OS X, I think ctrl-d is preferred.
I agree.
Here's some more info:
On the Unixes, ctl-d
On Fri, Mar 6, 2009 at 9:18 PM, Phil Hagelberg p...@hagelb.org wrote:
Allen Rohner aroh...@gmail.com writes:
[...]
One of the large advantages of Joda is that the API is constructed in
such a way that it is obvious what will happen. For example, there are
two ways to specify a duration, an
Real time is a special application domain. I am not sure that most
people want to work
in this domain (I did for several years with VMS and a power utility).
As for start up time for small utility commands I disagree, this is
something that
could change if we start to use the hardware a bit more
(Ctrl-C pressed here)
Traceback (most recent call last):
File stdin, line 1, in module
KeyboardInterrupt
That is something I miss from SBCL. In SLIME-SBCL, you can just Ctrl-
C Ctrl-C to interrupt your code. I think it's not possible (or at
least easy) in Clojure without adding
What's the recommended way to use this library in code that is run
outside a REPL to simplify stack traces so they focus on Clojure code
instead of Java code? I tried something like this, but it didn't work.
(use 'clojure.contrib.stacktrace)
... lots of code including definition of a main
Hi,
I'm trying to output accented characters from clojure. Actually, I'm
trying to call setToolTipText on a JComponent with some unicode
string. No problems doing so from Java, but with clojure I'm hitting a
wall.
In REPL:
exmentis= àéôö
→∟↔
exmentis= \u00f4
\├┤
exmentis= \u00c0
\À
Ok, so the
Does anyone know if there is a way to setup your Clojure REPL with an
initialization file like how SBCL works with a .sbclrc file? I'd like
to have my REPL automattically use some of the libraries in
clojure.contrib such as the repl-utils and the stacktrace libraries
whenever it first loads.
Thanks! Realized that a bit too late (Looked into the pmap source
code, but that's about it).
I've split my job decision roughly 1000 x 1000 - now I'm getting 8
times speedup, on 8 core machine:
(reduce +
(pmap
(fn [_]
(reduce +
Hi,
Am 06.03.2009 um 23:31 schrieb max3000:
I'm trying to output accented characters from clojure. Actually, I'm
trying to call setToolTipText on a JComponent with some unicode
string. No problems doing so from Java, but with clojure I'm hitting a
wall.
In REPL:
exmentis= àéôö
→∟↔
exmentis=
On Fri, Mar 6, 2009 at 4:33 PM, Christopher vth...@gmail.com wrote:
Does anyone know if there is a way to setup your Clojure REPL with an
initialization file like how SBCL works with a .sbclrc file? I'd like
to have my REPL automattically use some of the libraries in
clojure.contrib such as
I've just started using doto, after seeing the celsius example on the
Clojure page, but It brought back memories from Pascal days -
http://csci.csusb.edu/dick/samples/pascal.syntax.html#with_statement
It's probably nothing, but to me (with x (.Function1) (.Function2))
seems more readable than
The code below gives java.lang.IllegalArgumentException: More than one
matching method found: submit. Is there a way to tell Clojure which
submit method I want?
(defn do-stuff []
(+ 2 2))
(let [executor (java.util.concurrent.Executors/newSingleThreadExecutor)
future (.submit executor
Hello,
I'm not sure about this, but I think doto is named after the convention that
a lot of side effecting functions/macros/special forms follow : share the
do prefix if the name implies that there will be side effects.
And indeed, if you use doto with more than one following expression, then
I just added a couple functions to clojure.contrib.repl-utils in an
attempt to support Ctrl-C:
user= (use 'clojure.contrib.repl-utils)
nil
user= (add-break-thread!)
{1 #WeakReference java.lang.ref.weakrefere...@e29820}
This registers the current thread to be stopped next time an INT
On Mar 6, 3:23 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
The code below gives java.lang.IllegalArgumentException: More than one
matching method found: submit. Is there a way to tell Clojure which
submit method I want?
(defn do-stuff []
(+ 2 2))
(let [executor
Hi,
Am 07.03.2009 um 00:23 schrieb Laurent PETIT:
I'm not sure about this, but I think doto is named after the
convention that a lot of side effecting functions/macros/special
forms follow : share the do prefix if the name implies that there
will be side effects.
And indeed, if you use
Hey, thanks so much guys, that's exactly what I was looking for. I
completely forgot about this since it's been so long since I read the
Getting Started portion of the Clojure website.
Anyway, it may be helpful for other's like me who are looking for a
similar answer to know that to get this to
I think good arguments have been made for doto, but I must say I
prefer with slightly more.
FWIW, Groovy calls it with.
http://javajeff.blogspot.com/2008/11/getting-groovy-with-with.html
The great thing about Clojure is that if this really bothered me I
could easily take matters into my own
On Mar 6, 5:58 pm, max3000 maxime.lar...@gmail.com wrote:
I don't really want to use the SVN version because I'm developing an
application and can really do without the (normal) instabilities that
come with development builds.
FYI, you may want to consider using SVN for now because there
There is definitely a bug. In r994 (Aug 07, 2008) UTF8 encoding was
added to *in*, *out* and *err*. This messes up the Repl (and the
Reader in general) as discussed above.
Case in point, everything works fine when I go in the code and modify
RT.java as follows:
final static public Var OUT =
On Mar 5, 2009, at 8:00 PM, mike.farn...@gmail.com wrote:
I thought it neat that clojure supports fractions (just like
Smalltalk).
user= (/ 3)
1/3
I was sort of surprised by this.
user= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) )
0.3334
It comes as no surprise that
Some more information:
In REPL, everything seems fine:
exmentis= ààà
ààà
exmentis= (def a )
#'exmentis/a
exmentis= a
exmentis= (println a)
nil
exmentis= (. System/out println a)
nil
However, when I import a Java class:
public class Application {
public static final
Thanks for the very detailed explanation and all of the code examples.
I was a bit twiddler a long time ago.
(I enjoyed reading the opcodes in the mainframe dumps)
Lisp is a new language. And, I think it counts as the Language of
theYear,
since it is so different than Java.
I was playing with
I see a lot of let* in macro expansions, but Clojure's let already
behaves like Common Lisp's LET*. Is let* archaic? It seems to behave
the same as let in terms of sequential binding.
(let [x 8 y (inc x)] (list x y)) = (8 9)
(let* [x 8 y (inc x)] (list x y)) = (8 9)
Aloha,
David Sletten
Excuse my ignorance but these expressions occasionally and not wise
together are just opaque to me.
If my desktop was crawling because of the load, I might understand the
goal
of manually managing services but it's not the case at all.
Services not used are simply swapped if the system needs
let* is an an internal implementation detail that supports the special
form let. let* does no destructuring.
--Steve
On Mar 7, 2009, at 12:49 AM, David Sletten da...@bosatsu.net wrote:
I see a lot of let* in macro expansions, but Clojure's let already
behaves like Common Lisp's LET*. Is
Is there a variation of hash-map which supports comparison of keys
using identical? rather than = ? Ditto with sets.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email
On Mar 6, 5:58 pm, Chouser chou...@gmail.com wrote:
This registers the current thread to be stopped next time an INT
signal is recieved, which happens when the user presses Ctrl-C. Try
this:
user= (Thread/sleep 1)
Then press Ctrl-C before the 10 seconds are up, and you'll see:
80 matches
Mail list logo