Hi,
On 16 Dez., 12:47, kkw kevin.k@gmail.com wrote:
Should I build using Ant instead of Maven?
Using ant is the official way to build Clojure.
Sincerely
Meikel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Mon, Dec 15, 2008 at 10:41 PM, Daniel Eklund doekl...@gmail.com wrote:
I've been trying to get 'ns' right. The doc for 'require' tells me
the following about library loading:
The root resource path
is derived from the root directory path by repeating its last
component
and appending
In general, clojure-contrib is a good place to look to find examples
of properly laid-out libs, as well as generally idiomatic Clojure
code.
--Chouser
Yeah, just recently I've taken to scanning the code in 'webjure' and
'swank' to see how things are done, rather than relying on the APIs.
I
On Tuesday 16 December 2008 06:02, MikeM wrote:
You can try this:
(let [t (new Thread (fn[] (shutdown-agents)))]
(.. java.lang.Runtime (getRuntime) (addShutdownHook t)))
It works for me, but seems to take a long time to complete the
shutdown.
I tried adding this to the module that
On Dec 16, 7:50 am, Timothy Pratley timothyprat...@gmail.com wrote:
SS wrote a cells that works on refs quite a while
ago:http://groups.google.com/group/clojure/browse_thread/thread/d79392e4c...
Yeah, it works, but the interface is a little awkward. Rich said he
wants to add watchers for
On Tuesday 16 December 2008 07:36, Randall R Schulz wrote:
...
So I am still confused about the right way to deal with agents in
order to get reliable and prompt exit from the REPL and why an EOF
from the terminal hangs (only if agents were started and regardless
of whether a shutdown hook
On Tue, Dec 16, 2008 at 12:26 AM, Mon Key s...@derbycityprints.com wrote:
whoops, chopped of the end of that last message - forgot the nasake-no
ichigeki
user (seq? '(nil))
==|]==true
'(nil) is a list containing the single element nil. nil is no kind of
list whatsoever. So, (seq?
I think I'll be putting my money on (for) returning a cached lazy seq,
and (macroexpand) also tells me that there's a lazy-cons hidin in
there:
user= (macroexpand '(for [i (range 1 3)] (do (println i) i)))
(let* [iter__4007 (clojure.core/fn iter__7 [s__8]
(clojure.core/when-first [i s__8]
On Tuesday 16 December 2008 08:03, J. McConnell wrote:
...
'(nil) is a list containing the single element nil. nil is no kind of
list whatsoever. So, (seq? '(nil)) is true, since '(nil) is a list
and lists are seqs and (seq? nil) is false since nil is not a
sequence.
The quoted list
On Mon, Dec 15, 2008 at 7:33 PM, Rich Hickey richhic...@gmail.com wrote:
When pulling new Clojure from SVN, please do:
ant clean
ant
So you know you have a consistent build.
If the supported way to build Clojure is to clean before the build,
can we just have the init target depend on
On Tue, Dec 16, 2008 at 11:23 AM, Randall R Schulz rsch...@sonic.net wrote:
It is also the case that empty lists are self-evaluating:
user= ''()
(quote ())
user= '()
()
user= ()
()
Ahhh, good to know. Thanks!
- J.
--~--~-~--~~~---~--~~
You received
On Mon, Dec 15, 2008 at 11:54 AM, Peter Wolf opus...@gmail.com wrote:
I get the following error when I try ANTS.CLJ. Has something changed?
Recent Clojure from SVN and a recent download of ants.clj from the
google group seem to work fine together for me.
--Chouser
SS wrote a cells that works on refs quite a while ago:
http://groups.google.com/group/clojure/browse_thread/thread/d79392e4c79f8cde/f92eae422e4086c5?lnk=gstq=cells+refs#f92eae422e4086c5
If you search the group for cells you'll find quite a bit of
discussion
Hi folks,
When I run 'mvn install' from the clojure\trunk directory (svn
1160), Maven creates:
16/12/2008 10:37 PM 519,267 clojure-lang-1.0-SNAPSHOT.jar
When I run 'ant' from the clojure\trunk directory (svn 1160), Ant
creates:
16/12/2008 10:37 PM 1,393,895
You can try this:
(let [t (new Thread (fn[] (shutdown-agents)))]
(.. java.lang.Runtime (getRuntime) (addShutdownHook t)))
It works for me, but seems to take a long time to complete the
shutdown.
Your question made me wonder if the agent thread pools should use
daemon threads - then this
Thanks, Lennart. That works, although it took me a few minutes to
figure out why. (For the record, tree-seq returns a copy of its
argument as the first item in the sequence.) This also means that
(flatten string)
;= (\s \t \r \i \n \g)
I've put in a patch.
-Stuart Sierra
On Dec 15,
On Dec 16, 2008, at 8:37 AM, Tom Hickey wrote:
Hey Rich,
Eric and I were also wondering if the logo was under the same license
as Clojure itself. If it is, should this be explicitly stated
somewhere?
I think using a license designed for code is slightly inappropriate
for artwork. I
On Tue, Dec 16, 2008 at 12:11 AM, Feng hou...@gmail.com wrote:
Hi,
Because clojure set, vector and map all implements
java.util.Comparator (indirectly via AFn), they interact with
java.util.TreeSet/TreeMap in surprising way due to overloaded ctor
(java.util.Comparator).
user= (def s
Hey Rich,
Eric and I were also wondering if the logo was under the same license
as Clojure itself. If it is, should this be explicitly stated
somewhere?
Thanks,
Tom
On Dec 9, 1:03 am, samppi rbysam...@gmail.com wrote:
I've uploaded thelogo'sglyph and added it to Clojure's article.
However,
On Mon, Dec 15, 2008 at 10:08 PM, Alex Burka zapper3...@gmail.com wrote:
Thanks for Gorilla. I am using it with MacVim. One (or :bug :pebkac)
report...
I put plugin/gorilla.vim in /Applications/MacVim.app/Contents/
Resources/vim/runtime/plugin/ and it seems to be loaded when MacVim
starts.
Hello,
I try to fill the gap from when I discovered clojure several months
ago, and I'm trying to understand the lib vs namespace stuff.
I go straight to what I consider may be the primary source of
documentation by calling (doc require), and I see this :
'require loads a lib by loading its
Hi,
A couple of days ago I was having a lot of trouble getting the
(ClassName. ctor-args...) form of constructors to work while (new
ClassName ctor-args...) was fine. It eventually occurred to me that the
problem had to do with those constructor calls being in macro bodies.
Now it turns out
FYI - I forwarded the patch to Jeffrey Chu and he has patched
swank-clojure in git.
- Bill
On Sun, Dec 14, 2008 at 2:20 PM, Feng hou...@gmail.com wrote:
This is due to the change in clojure svn 1158. (.method ClassName ...)
syntax has been changed to call java.lang.Class method for
On Tue, Dec 16, 2008 at 11:59 AM, Mon Key s...@derbycityprints.com wrote:
This is why flatten's behavior was considered a bug. In Clojure, an
empty sequence is equivalent to nil, not to '(nil).
This does not comport with the various differences enumerated @
http://clojure.org/lisps
Perhaps
There must be a smarter way to achieve this than polling the
collection for changes, I guess.
On 16 Dez., 21:43, Dave Griffith dave.l.griff...@gmail.com wrote:
Right now, you add listeners to agents, but not refs. IIRC, there
was talk of adding listeners to refs to enable just the sort of
On Sun, Dec 14, 2008 at 4:29 PM, Tommy t...@aia.dk wrote:
Hello.
I am having problems with gen-and-load-class. I have a file with an
example from the wiki book:
(gen-and-load-class 'user.UserException :extends Exception)
(defn user-exception-test []
(try
(throw (new
Hello,
Is the ants.clj supposed to work on single core ~700MHZ CPU?
The program loads and runs, but all ants stay at home (but the CPU
is busy).
I am using latest svn version of clojure on:
java version 1.6.0_0
IcedTea6 1.3.1 Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build
Right now, you add listeners to agents, but not refs. IIRC, there
was talk of adding listeners to refs to enable just the sort of
reactive programming you describe, but I don't know the status.
--~--~-~--~~~---~--~~
You received this message because you are
Well,
Reducing the number of ants helped and it works...
Vlad
--~--~-~--~~~---~--~~
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
If I'm wrong, could you please help me understand, maybe by giving me
a URL I may have missed ?
Regards,
--
Laurent PETIT
yes it is out of date... check the post 5 posts down:
http://groups.google.com/group/clojure/browse_frm/thread/4a4c2e3e7aab5325#
Hi,
Wordy though I am, I've never done any blogging before, but now that I'm
finally beginning to get up-to-speed on Clojure, I think I might have
some things to say.
So I was wondering if anyone could recommend a good blog site for this
purpose? Naturally, I'll want to include source code,
To make sure your driver is really on the classpath, try this from the
REPL:
(. Class (forName com.microsoft.sqlserver.jdbc.SQLServerDriver))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post
Hi Randall,
The syntactic sugar forms are reader behavior, and occur too soon: at
read time, not macro expansion time.
Macros need to expand to real forms, not reader shortcuts.
Stuart
Hi,
A couple of days ago I was having a lot of trouble getting the
(ClassName. ctor-args...) form of
On Tuesday 16 December 2008 11:32, Stuart Halloway wrote:
Hi,
...
However, I am left wondering what exactly is the interaction that
was causing the dot-suffix form of the constructor call to fail in
a macro expansion. I sense it has to do with the fact that symbols
(other than
On Dec 16, 2:32 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Hi Randall,
The syntactic sugar forms are reader behavior, and occur too soon: at
read time, not macro expansion time.
Actually, the dot sugar is not reader magic, but macroexpansion, as
documented here:
On Tuesday 16 December 2008 12:37, Rich Hickey wrote:
On Dec 16, 2:32 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Hi Randall,
The syntactic sugar forms are reader behavior, and occur too soon:
at read time, not macro expansion time.
...
Macros need to expand to real forms,
Thanks Meikel and Dave! Much appreciated.
Kev
On Dec 17, 12:13 am, Dave Newton newton.d...@yahoo.com wrote:
--- On Tue, 12/16/08, kkw kevin.k@gmail.com wrote:
Since the Ant-built file is bigger, should I build
using Ant instead of Maven?
It looks like the Ant build is compiling
This is confusing. First, if you read the docs, they begin with:
-
(Classname. args*)
(new Classname args*)
Special form.
-
Only if you read further do you discover that (Classname. args*) is
not a special form but a macro.
I am fairly familiar with basic functional programming. I've studied
a bit of scheme and Haskell. I don't quite understand Vars, Refs,
Agents and Atoms. I am a Java developer and have worked with
concurrency constructs: locks, synchronized, Executor framework, etc.
I've read a couple of
Hi all,
I sometimes need to (re)load a library, removing public symbols from
previously loaded version of the same lib:
(defmacro ns-reload! [ns]
`(do
(if (find-ns '~ns)
(doseq [s# (keys (ns-publics '~ns))] (ns-unmap '~ns s#)))
(require :reload-all '~ns)))
Use case:
I don't think that's a problem:
user (. Class (forName com.microsoft.sqlserver.jdbc.SQLServerDriver))
com.microsoft.sqlserver.jdbc.SQLServerDriver
On Tue, Dec 16, 2008 at 12:21 PM, MikeM michael.messini...@invista.comwrote:
To make sure your driver is really on the classpath, try this from
Check out http://blip.tv/file/812787/ which is a video presentation by
Rich Hickey on clojure concurrency; it ends with an description of an
ant simulation that uses refs and agents -- it really helped my own
intuitive feel of when to use those two constructs.
Best,
Andrew
On Tuesday 16 December 2008 13:54, Andrew Baine wrote:
Check out http://blip.tv/file/812787/ ...
Rich's video presentations are also available via the iTunes store.
Search for Clojure, of course—you won't get any false hits.
Best,
Andrew
Randall Schulz
On Sunday 14 December 2008 13:47, Chouser wrote:
I've updated the Clojure classes graph (thanks for the push, R.
Schulz!) The new version includes the newest classes as well as Java
interfaces that are applicable. These latter are shown inside
diamonds.
...
I won't be maintaining the
The enclosed patch updates clojure.main to fix a bug and implement
changes discussed here recently. Details below. Feedback welcome.
--Steve
[1] clojure.main no longer calls gen-class. Instead there is now a
stub clojure.main class written in Java so it is always available with
Clojure's
I would find this useful; I've even tried writing it in the past.
Perhaps it could go in clojure.contrib.ns-utils.
A thought -- would it be more thorough to use remove-ns?
-the other Stuart (Sierra)
On Dec 16, 4:32 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Hi all,
I sometimes
On Dec 16, 4:55 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
I would find this useful; I've even tried writing it in the past.
Perhaps it could go in clojure.contrib.ns-utils.
A thought -- would it be more thorough to use remove-ns?
-the other Stuart (Sierra)
On Dec 16, 4:32 pm,
If I create a new sequence by adding data to an existing one, does
Clojure allow the two sequences to share data as opposed to copying
the original sequence? For example,
(def coll1 [1 2])
(def coll2 (cons 3 coll1))
Does coll2 share the data in coll1 or have a copy of it?
I'm guessing the
OK, thank you for the link.
I know don't feel comfortable with the notion of lib. I currently
assume that it is more or less similar to a namespace : it looks like
a namespace, it tastes like a namespace, but still does seem to be not
considered a namespace.
In which ways does the notion of lib
On Dec 16, 2008, at 6:29 PM, Mark Volkmann wrote:
If I create a new sequence by adding data to an existing one, does
Clojure allow the two sequences to share data as opposed to copying
the original sequence? For example,
(def coll1 [1 2])
(def coll2 (cons 3 coll1))
Does coll2 share the data
On Dec 16, 2008, at 6:35 PM, Stephen C. Gilardi wrote:
It shares the data--which is safe because of immutability and
efficient because Rich designed and implemented Clojure's persistent
data structures carefully and well.
But Mark was talking about sequences, not persistent data
On Sun, Dec 14, 2008 at 3:24 PM, Michel Salim michel.syl...@gmail.com wrote:
My mistake; unchecked operations work just fine if their arguments
(including constants) are given type hints. What happens if unchecked-
add/sub/... is given an argument of unknown type, though? It still
seems to
Hi All,
For any of you who do XSLT 2.0 processing, I've written a simple
Clojure wrapper around Saxon's (saxonica.com) high-level Java API.
It's at
http://github.com/pjt/saxon/tree/master
Best,
Perry
--~--~-~--~~~---~--~~
You received this message
I know don't feel comfortable with the notion of lib. I currently
assume that it is more or less similar to a namespace : it looks like
a namespace, it tastes like a namespace, but still does seem to be not
considered a namespace.
I understand your pain. I am right now going through the
On Tuesday 16 December 2008 18:10, wubbie wrote:
Hello,
My question is that conj takes two argument and how conj finds
the first argument? Is it somehow provided by commute?
Consider the documentation for (commute ...) (at
http://clojure.org/api):
Thanks Randall.
My background is mostly in imperative languages, including perl
and perl has closure, so it looks commute uses closure concept
to implement this. Is it right?
Thanks again,
sun
On Dec 16, 9:28 pm, Randall R Schulz rsch...@sonic.net wrote:
On Tuesday 16 December 2008 18:10,
56 matches
Mail list logo